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

AttributeError: module 'numpy' has no attribute 'float'. #3

Open
xavierchee opened this issue Sep 5, 2023 · 0 comments
Open

AttributeError: module 'numpy' has no attribute 'float'. #3

xavierchee opened this issue Sep 5, 2023 · 0 comments

Comments

@xavierchee
Copy link

Can i know how i can deal with this issue?

AttributeError: 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.

Traceback (most recent call last):
File "", line 1, in
File "/fred/oz241/xchee/sandbox_AAScore/AA_Score.py", line 319, in predict_dG
score = calc_score(mol_lig, mol_prot, clf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/fred/oz241/xchee/sandbox_AAScore/AA_Score.py", line 253, in calc_score
ele_same_dict, ele_opposite_dict = calc_ele_descriptor(
^^^^^^^^^^^^^^^^^^^^
File "/fred/oz241/xchee/sandbox_AAScore/AA_Score.py", line 119, in calc_ele_descriptor
ele = Electrostatic(res, mol_lig, mol_prot)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/fred/oz241/xchee/sandbox_AAScore/utils/electrostatic.py", line 45, in init
self.side_ele_same, self.side_ele_opposite = self.calc_eletronic(self.side_atoms, self.side_charges)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/fred/oz241/xchee/sandbox_AAScore/utils/electrostatic.py", line 81, in calc_eletronic
ele_matrix = self.get_ele_matrix(atoms, charges)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/fred/oz241/xchee/sandbox_AAScore/utils/electrostatic.py", line 67, in get_ele_matrix
ele_matrix = np.zeros((len(atoms), len(self.lig_atoms)), dtype=np.float)

File "/home/xchee/.conda/envs/conda_vs/lib/python3.11/site-packages/numpy/init.py", line 319, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: 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.

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

1 participant