We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b41630d commit a6c5e63Copy full SHA for a6c5e63
unittest/python/test_switch.py
@@ -3,16 +3,19 @@
3
import eigenpy
4
import numpy as np
5
6
+eigenpy.switchToNumpyMatrix()
7
quat = eigenpy.Quaternion()
8
# By default, we convert as numpy.matrix
9
coeffs_vector = quat.coeffs()
10
print(type(coeffs_vector))
11
12
assert isinstance(coeffs_vector,np.matrixlib.defmatrix.matrix)
13
+assert eigenpy.getNumpyType() == np.matrix
14
15
# Switch to numpy.array
16
eigenpy.switchToNumpyArray()
17
coeffs_array = quat.coeffs()
18
print(type(coeffs_array))
19
20
assert isinstance(coeffs_vector,np.ndarray)
21
+assert eigenpy.getNumpyType() == np.ndarray
0 commit comments