Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

descriptor calculation error module 'numpy' has no attribute 'float' #107

Open
abckit opened this issue May 21, 2023 · 2 comments
Open

descriptor calculation error module 'numpy' has no attribute 'float' #107

abckit opened this issue May 21, 2023 · 2 comments

Comments

@abckit
Copy link

abckit commented May 21, 2023

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 builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.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#deprecations

my 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

@ajaymur91
Copy link

Numpy < 1.20 should work I think. Installing using conda will probably pickup the correct numpy dependency.

@lvotapka
Copy link

Using the community version of Mordred fixed this issue for me mordred-community and can be installed from PyPI: pip install mordredcommunity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants