-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
BUG?: .fill(np.nan)
an int64
array raises ValueError on main
#21784
Comments
The change is unrelated to the fact that the array is empty, if it is not, you get:
(where the value is undefined and platform dependent.) This is gh-20924 (not the casting change). Yes, it was an intended change because it now works the same way as But, of course that doesn't mean that we can just get away with the change, unfortunately. Astropy may also have a problem with this, because apparently |
.fill(np.nan)
a 0-len empty int64 array raises ValueError on main.fill(np.nan)
an int64
array raises ValueError on main
From the pandas side, it was sufficient enough to adjust to this change as it aligns with similar value based dtype behavior changes on our end. So feel free to close or address as needed on your side. |
Thakns for the note! Lets wait a bit. Astropy also notices this in 1-2 tests, and I am not sure they looked at it thoroughly. But if pandas has a backported fix, I think we may be able to just go with it. (This might also be a NumPy 2.0 with some chance, but lets not plan that yet...) If anyone else runs into it, please make a note, because if pandas is OK with it I would slightly lean towards keeping the change. |
Nobody else has complained about this yet in the past months, so for the moment it seems we should be good for the release. |
Describe the issue:
We're seeing a change filling a 0-len int64 array on our numpy dev build in pandas: https://github.com/pandas-dev/pandas/runs/6919574372?check_suite_focus=true
Is this an intended change?
Maybe related to #21437
Reproduce the code example:
vs
Error message:
NumPy/Python version information:
(Python 3.9.12 if that matters)
The text was updated successfully, but these errors were encountered: