-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REGR: maybe_convert_objects ignoring uints #47475
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
Changes from all commits
834b1be
6e3857a
e62b306
4e4cac9
6387823
9458e40
9f69eda
9ca2f40
5151dca
a2f77f4
7c1c72e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -745,6 +745,25 @@ def test_constructor_signed_int_overflow_deprecation(self): | |
expected = Series([1, 200, 50], dtype="uint8") | ||
tm.assert_series_equal(ser, expected) | ||
|
||
@pytest.mark.parametrize( | ||
"values", | ||
[ | ||
np.array([1], dtype=np.uint16), | ||
np.array([1], dtype=np.uint32), | ||
np.array([1], dtype=np.uint64), | ||
[np.uint16(1)], | ||
[np.uint32(1)], | ||
[np.uint64(1)], | ||
], | ||
) | ||
def test_constructor_numpy_uints(self, values): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are pd.Index or pd.array affected? pd.NumericIndex? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pd.array and pd.NumericIndex are not impacted; I've added tests for Index.
Both of these are the same as 1.4.3 |
||
# GH#47294 | ||
value = values[0] | ||
result = Series(values) | ||
|
||
assert result[0].dtype == value.dtype | ||
assert result[0] == value | ||
|
||
def test_constructor_unsigned_dtype_overflow(self, any_unsigned_int_numpy_dtype): | ||
# see gh-15832 | ||
msg = "Trying to coerce negative values to unsigned integers" | ||
|
Uh oh!
There was an error while loading. Please reload this page.