Skip to content

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

@KimJongkwang

Description

@KimJongkwang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions