Verified Commit a6c5e63f authored by Justin Carpentier's avatar Justin Carpentier
Browse files

test/switch: test getNumpyType

parent b41630d3
......@@ -3,12 +3,14 @@ from __future__ import print_function
import eigenpy
import numpy as np
quat = eigenpy.Quaternion()
# By default, we convert as numpy.matrix
coeffs_vector = quat.coeffs()
assert isinstance(coeffs_vector,np.matrixlib.defmatrix.matrix)
assert eigenpy.getNumpyType() == np.matrix
# Switch to numpy.array
......@@ -16,3 +18,4 @@ coeffs_array = quat.coeffs()
assert isinstance(coeffs_vector,np.ndarray)
assert eigenpy.getNumpyType() == np.ndarray
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment