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

Error in index/base.py when using NumPy 1.24 or higher - Replace np.int with np.int_ #153

Open
KimJongkwang opened this issue Oct 18, 2023 · 0 comments

Comments

@KimJongkwang
Copy link

I encountered an issue when using mlens that relates to the index/base.py file. Specifically, in line 83, the code sizes = (n // p) * np.ones(p, dtype=np.int) throws an error when using NumPy version 1.24 or higher.

It appears that the use of np.int has been deprecated in NumPy 1.20 and later versions. To resolve this issue, I suggest replacing dtype=np.int with dtype=np.int_. The corrected code should look like this: sizes = (n // p) * np.ones(p, dtype=np.int_).

Please consider making this modification to ensure compatibility with NumPy versions 1.24 and higher.

Thank you.

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