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

overflow error #6

Open
hokru opened this issue Jul 24, 2024 · 1 comment
Open

overflow error #6

hokru opened this issue Jul 24, 2024 · 1 comment

Comments

@hokru
Copy link

hokru commented Jul 24, 2024

Hi,

When trying to run the example under Usage on a Linux machine with python3.9 (conda) i get

Traceback (most recent call last):
  File "/home/holger/Chembl_tmap/mhfp_test.py", line 5, in <module>
    fp_a = mhfp_encoder.encode('CCOC1=C(C=C(C=C1)S(=O)(=O)N(C)C)C2=NC(=O)C3=C(N2)C(=NN3C)C(C)(C)C')
  File "/home/holger/mambaforge/envs/tmap/lib/python3.9/site-packages/mhfp/encoder.py", line 78, in encode
    return self.from_molecular_shingling(
  File "/home/holger/mambaforge/envs/tmap/lib/python3.9/site-packages/mhfp/encoder.py", line 130, in from_molecular_shingling
    np.remainder(
OverflowError: Python integer 2305843009213693951 out of bounds for uint32

I believe it's from numpy=2.0.0 as numpy=1.26.4 does not show this.
A workaround seems to be to declare np.uint64 in the np.remainder function.

@JacksonBurns
Copy link

I can confirm that I am also getting this error.

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

2 participants