test_dimensions.py
Go to the documentation of this file.
1 from __future__ import print_function
2 
3 import eigenpy
4 import numpy as np
5 
6 quat = eigenpy.Quaternion()
7 # By default, we convert as numpy.matrix
8 eigenpy.switchToNumpyMatrix()
9 coeffs_vector = quat.coeffs()
10 assert len(coeffs_vector.shape) == 2
11 
12 # Switch to numpy.array
13 eigenpy.switchToNumpyArray()
14 coeffs_vector = quat.coeffs()
15 assert len(coeffs_vector.shape) == 1


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Apr 17 2021 02:37:59