File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -36,3 +36,4 @@ ENDIF()
3636ADD_PYTHON_UNIT_TEST("py-matrix" "unittest/python/test_matrix.py" "unittest" )
3737ADD_PYTHON_UNIT_TEST("py-geometry" "unittest/python/test_geometry.py" "unittest" )
3838ADD_PYTHON_UNIT_TEST("py-switch" "unittest/python/test_switch.py" "python/eigenpy" )
39+ ADD_PYTHON_UNIT_TEST("py-dimensions" "unittest/python/test_dimensions.py" "python/eigenpy" )
Original file line number Diff line number Diff line change 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+ coeffs_vector = quat .coeffs ()
9+ assert len (coeffs_vector .shape ) == 2
10+
11+ # Switch to numpy.array
12+ eigenpy .switchToNumpyArray ()
13+ coeffs_vector = quat .coeffs ()
14+ assert len (coeffs_vector .shape ) == 1
You can’t perform that action at this time.
0 commit comments