Our code currently uses the numpy.matrix subclass, which is generating a PendingDeprecationWarning as it is not the recommended way to represent matrices or deal with linear algebra in NumPy. We need to replace instances of numpy.matrix with numpy.ndarray to ensure future compatibility and eliminate the warning.
tests/test_blending_steps.py: 5184 warnings
/home/runner/micromamba/envs/test_environment/lib/python3.11/site-packages/numpy/matrixlib/defmatrix.py:70: 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.
return matrix(data, dtype=dtype, copy=False)
I think this warning is triggered in blending/steps.pylines 1726-1744 where we use numpy.matrix through the np.asmatrix and .getI() methods, which is likely triggering the warning. To fix this, we should replace the use of numpy.matrix with numpy.ndarray and use the appropriate functions from numpy and scipy for matrix operations.
Our code currently uses the numpy.matrix subclass, which is generating a PendingDeprecationWarning as it is not the recommended way to represent matrices or deal with linear algebra in NumPy. We need to replace instances of numpy.matrix with numpy.ndarray to ensure future compatibility and eliminate the warning.
For example here:
I think this warning is triggered in
blending/steps.py
lines 1726-1744 where we use numpy.matrix through the np.asmatrix and .getI() methods, which is likely triggering the warning. To fix this, we should replace the use of numpy.matrix with numpy.ndarray and use the appropriate functions from numpy and scipy for matrix operations.