-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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: Creation of UInt64 column with 18446744073709551615 throws RuntimeWarning #60214
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for the PR! Please always add tests when fixing bugs or changing behavior.
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.
Can you add a test for DataFrame/Series construction as well.
data.soften_mask() # set hardmask False if it was True | ||
data[mask] = fill_value | ||
dtype = cast(np.dtype, data.dtype) | ||
if isinstance(dtype, ExtensionDtype) and dtype.name.startswith("Masked"): |
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 haven't checked thoroughly, but I think you want dtype._can_hold_na
instead of having logic depend on the name of the dtype.
), | ||
], | ||
) | ||
def test_sanitize_masked_array_with_masked_ea(values, dtype, expected): |
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.
Can you add a case that tests for a large number as in an issue.
Also start the test with a reference to the GitHub issue:
# GH#60050
18446744073709551615
throws RuntimeWarning #60050