Open abckit opened 1 year ago
Numpy < 1.20 should work I think. Installing using conda will probably pickup the correct numpy dependency.
Using the community version of Mordred fixed this issue for me mordred-community and can be installed from PyPI: pip install mordredcommunity
Description: I tried to run an example from the mordred documentation page but got into error showing "module 'numpy' has no attribute 'float'."
code: from rdkit import Chem from mordred import Calculator, descriptors
calc = Calculator(descriptors, ignore_3D=True) len(calc.descriptors) len(Calculator(descriptors, ignore_3D=True, version="1.0.0")) mol = Chem.MolFromSmiles('c1ccccc1') abc=calc(mol) print(abc[0].error)
output: module 'numpy' has no attribute 'float'.
np.float
was a deprecated alias for the builtinfloat
. To avoid this error in existing code, usefloat
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.float64
here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsmy environment: python --version Python 3.11.3
numpy 1.24.3
I am not sure if i have mistake somewhere and i am new to mordred. Would appreciate any comments or suggestions.
Rgds Kit