You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run into an error with newer numpy versions (1.24.0):
File ~/work/graphein/graphein/graphein/molecule/features/graph/molecule.py:67, in <dictcomp>(.0)
62 descriptors = {
63 k: v for k, v in descriptors.items() if k in descriptor_list
64 }
66 # Compute descriptors
---> 67 desc = {d: descriptors[d](mol) for d in descriptors}
69 # Process Outformat
70 if return_array:
File /usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/rdkit/Chem/GraphDescriptors.py:124, in Ipc(mol, avg, dMat, forceDMat)
121 mol._adjMat = dMat
123 adjMat = numpy.equal(dMat, 1)
--> 124 cPoly = abs(Graphs.CharacteristicPolynomial(mol,adjMat))
125 if avg:
126 return entropy.InfoEntropy(cPoly)
File /usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/rdkit/Chem/Graphs.py:43, in CharacteristicPolynomial(mol, mat)
41 I = 1. * numpy.identity(nAtoms)
42 An = A
---> 43 res = numpy.zeros(nAtoms + 1, numpy.float)
44 res[0] = 1.0
45 for n in range(1, nAtoms + 1):
File /usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/numpy/__init__.py:284, in __getattr__(attr)
2[81](https://github.com/a-r-j/graphein/actions/runs/3680239676/jobs/6320741907#step:8:82) from .testing import Tester
2[82](https://github.com/a-r-j/graphein/actions/runs/3680239676/jobs/6320741907#step:8:83) return Tester
--> 284 raise AttributeError("module {!r} has no attribute "
285 "{!r}".format(__name__, attr))
AttributeError: module 'numpy' has no attribute 'float'
From this article it appears some aliases (like np.float) have been deprecated. As a result, I think the supported NumPy versions should be constrained or the underlying code refactored to support new versions.
The text was updated successfully, but these errors were encountered:
Hi. This was already fixed in the RDKit repository (rdkit/rdkit#5897). The next RDKit PyPI release should work Numpy >=1.24. In the meantime, please use an older numpy version. Hope this works for you.
Please leave this issue open until the next version is released.
Hiya,
I run into an error with newer numpy versions (1.24.0):
From this article it appears some aliases (like
np.float
) have been deprecated. As a result, I think the supported NumPy versions should be constrained or the underlying code refactored to support new versions.The text was updated successfully, but these errors were encountered: