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

MNT: Remove np.float_ alias; it is removed in NumPy 2.0 #7118

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

larrybradley
Copy link
Contributor

Description

Importing scikit-image in an environment with numpy 2.0dev gives an AttributeError:

AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.. Did you mean: 'float16'?

xref: numpy/numpy#24376

This PR removes the usage of the np.float_ alias. It's the same as np.float64.

>>> np.float_ is np.float64
True

Checklist

Release note

Summarize the introduced changes in the code block below in one or a few sentences. The
summary will be included in the next release notes automatically:

...

@jarrodmillman jarrodmillman added the 🔧 type: Maintenance Refactoring and maintenance of internals label Sep 7, 2023
@stefanv stefanv merged commit 86b3f0b into scikit-image:main Sep 7, 2023
20 of 21 checks passed
@stefanv stefanv added this to the 0.22 milestone Sep 7, 2023
@larrybradley larrybradley deleted the np-float branch September 7, 2023 13:05
@jarrodmillman jarrodmillman changed the title MNT: Remove np.float_ alias; it is removed in NumPy 2.0 MNT: Remove np.float_ alias; it is removed in NumPy 2.0 Oct 3, 2023
@jarrodmillman jarrodmillman changed the title MNT: Remove np.float_ alias; it is removed in NumPy 2.0 MNT: Remove np.float_ alias; it is removed in NumPy 2.0 Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 type: Maintenance Refactoring and maintenance of internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants