The use of np.mat in nimfa causes an AttributeError when using NumPy 2.0 or later, as np.mat has been removed. This issue occurs in the following files:
- nimfa/methods/seeding/nndsvd.py
- nimfa/utils/linalg.py
Steps to reproduce:
Install NumPy 2.0 or later.
Run any code that uses nimfa, such as NMF initialization with Nndsvd.
Error message:
AttributeError: np.mat was removed in the NumPy 2.0 release. Use np.asmatrix instead.
one solution:
Replace all occurrences of np.mat with np.asmatrix in the code source. This change resolves the issue and maintains compatibility with both older and newer versions of NumPy.
The use of np.mat in nimfa causes an AttributeError when using NumPy 2.0 or later, as np.mat has been removed. This issue occurs in the following files:
Steps to reproduce:
Install NumPy 2.0 or later.
Run any code that uses nimfa, such as NMF initialization with Nndsvd.
Error message:
one solution:
Replace all occurrences of np.mat with np.asmatrix in the code source. This change resolves the issue and maintains compatibility with both older and newer versions of NumPy.