-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
numpy 1.24.0rc1 gives scalar False in masked_invalid when input is plain array #22720
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
Comments
Must have been a side-effect of pluggin in But I don't see why not to just add a |
Thanks for the reply! In 1.24.0rc1, >>> np.ma.core.get_mask([1,2,3])
False |
Oh, it does... I think there should be a way to materialize the full mask, I thinkt here was an internal |
Sorry... the point was, there is some utility function that converts the |
So, this feature will ship for sure with 1.24? Just want to know if I should code in check for this or will this be reverted if it wasn't intentional. Thanks! |
Honestly, I would go with whatever you prefer/think here :). But since you noticed the change, the conservative thing might be to just change back that particular part. |
I am neutral as well but then again I am not the main devs for the affected package. I only noticed it in "integration testing". The patch isn't horrible and I really don't know how many more packages use it like this. |
Well, I guess if we are neutral, it means we are not enthusiastic enough about cleaning up the behavior and should just add the hack to retain the old one ;). |
Actually, since I replied, specreduce has decided to remove this particular usage altogether, so with astropy/specreduce#155 , this issue no longer affects us but still might for a different package, not sure. cc @ojustino |
As @pllim said, this is no longer causing problems for |
This is the minimal solution to fix numpygh-22826 with as little change as possible. We should fix `getdata()` but I don't want to do that in a bug-fix release really. IMO the alternative is to revert numpygh-22046 which would also revert the behavior noticed in numpygh-22720 (which seems less harmful though). Closes numpygh-22826
This is the minimal solution to fix numpygh-22826 with as little change as possible. We should fix `getdata()` but I don't want to do that in a bug-fix release really. IMO the alternative is to revert numpygh-22046 which would also revert the behavior noticed in numpygh-22720 (which seems less harmful though). Closes numpygh-22826
Matplotlib relies on this, so we don't seem to have much of a choice. I am surprised that we were not notified of the issue before release time. Closes numpygh-22720, numpygh-22720
Matplotlib relies on this, so we don't seem to have much of a choice. I am surprised that we were not notified of the issue before release time. Closes numpygh-22720, numpygh-22720
Is this change intentional? I cannot tell.
As a result of this change, when someone pass in plain array and then try to grab the
.mask
, it hasndim=0
and the shape no longer matches the input, causing some downstream assumptions to break.xref astropy/specreduce#153
numpy 1.23.5
numpy 1.24.0rc1
The text was updated successfully, but these errors were encountered: