-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
BUG: Fix ExtensionArray binary op protocol #61990
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
base: main
Are you sure you want to change the base?
Conversation
…dd tests for numeric EA shape errors
f9cb022
to
9496569
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
for more information, see https://pre-commit.ci
This comment was marked as resolved.
This comment was marked as resolved.
for more information, see https://pre-commit.ci
ea_array = array([1, 2, 3, 4, 5], dtype="Int64") | ||
result = np_array * ea_array | ||
assert isinstance(result, type(ea_array)) | ||
tm.assert_equal(result, array([1, 4, 9, 16, 25], dtype="Int64")) |
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.
is this actually affected by this PR? if not i expect it is already tested?
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.
Test checks that multiplying a NumPy array by an ExtensionArray gives the correct type (an ExtensionArray), which means the fallback via NotImplemented is working as intended. I couldnt find anything similar in test_numeric.py or some other files i tried to look into.
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.
if you think its checked elsewhere, i will remove it
This comment was marked as resolved.
This comment was marked as resolved.
for more information, see https://pre-commit.ci
This comment was marked as resolved.
This comment was marked as resolved.
for more information, see https://pre-commit.ci
Uh oh!
There was an error while loading. Please reload this page.