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

Sequence generation failing on Windows machine #6

Open
mmamica opened this issue Oct 26, 2023 · 0 comments
Open

Sequence generation failing on Windows machine #6

mmamica opened this issue Oct 26, 2023 · 0 comments

Comments

@mmamica
Copy link

mmamica commented Oct 26, 2023

Hi, I was exploring your modules for sequence generation. I stumbled across one issue appearing in sequence_generation.py and sonia.py scripts. I was getting below error:

ValueError: high is out of bounds for int32

for the part of code that is generating the seeds values:

seeds=np.random.randint(2**32-1,size=num_gen_seqs)

Since no dtype is provided for np.random.randint method, numpy is using a default int, which is platform dependant. For Windows64 machines this will be int32 (you can read about it here: https://stackoverflow.com/questions/36278590/numpy-array-dtype-is-coming-as-int32-by-default-in-a-windows-10-64-bit-machine). Since it's a signed 32 bits integer, the 2**32-1 value is out of bounds. You can easily fix it by specifying dtype while generating seeds, for example:
seeds=np.random.randint(2**32-1,size=num_seqs,dtype=np.int64)

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