Under the followings environment, we can see PendingDeprecationWarning from numpy.
$ pip freeze
numpy==1.20.1
pyquaternion==0.9.9
$ python pyquaternion/test/test_quaternion.py
.....................................................pyquaternion/test/test_quaternion.py:310: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
R = np.matrix(np.eye(3))
.pyquaternion/test/test_quaternion.py:334: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
npm = np.matrix(m)
...............
----------------------------------------------------------------------
Ran 69 tests in 0.112s
OK
So, we should use ndarray instead of numpy.matrix.
Under the followings environment, we can see PendingDeprecationWarning from numpy.
So, we should use ndarray instead of numpy.matrix.
ref. https://github.com/numpy/numpy/blob/master/numpy/matrixlib/defmatrix.py#L116-L121