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
Handle new warnings introduced in NumPy 1.24 #6637
Conversation
This warning appears with NumPy>=1.24 where np.int0 has been deprecated
This warning appears with NumPy>=1.24 where np.bool8 has been deprecated
The fix for Cascade in f25ae85 does not seem like the correct solution as it will break again with an error once the deprecation cycle completes. I am not familiar with that code so would like to leave a proper fix to a separate PR. I will open an issue for it. The reported warning from the log is:
|
Three failures remaining in
|
Regarding the relatively low updated the comment as I am not sure what term is the primary contributor to the numerical error and don't think it is the one I originally mentioned |
@@ -109,7 +109,7 @@ def test_copy(): | |||
|
|||
def test_bool(): | |||
img_ = np.zeros((10, 10), bool) | |||
img8 = np.zeros((10, 10), np.bool8) | |||
img8 = np.zeros((10, 10), np.bool_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should np.bool_
just be bool
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they are all equivalent. They do have different entries here, though:
scikit-image/skimage/util/dtype.py
Lines 25 to 27 in f11c27f
dtype_range = {bool: (False, True), | |
np.bool_: (False, True), | |
np.bool8: (False, True), |
so I think that is why there was both bool and np.bool8 separately here previously. I just changed bool8
to bool_
since that one is not deprecated.
Co-authored-by: Mark Harfouche <mark.harfouche@gmail.com>
Co-authored-by: Brett M. Morris <morrisbrettm@gmail.com>
The pre-release test case on CI fails due to a few new warnings introduced in NumPy 1.24 (example of a recent test log). (Our pre-release test CI job treats warnings as errors via env var
SKIMAGE_TEST_STRICT_WARNINGS_GLOBAL=1
)The changes here should resolve these failures.