Skip to content

BUG: fix Series(extension array) + extension array values addition #22479

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

Merged
merged 6 commits into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update whatsnew and add issue number
  • Loading branch information
peterpanmj committed Sep 20, 2018
commit 4f7ada3148e72b42500dff0c173ac0ff255ce273
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ ExtensionType Changes
- :meth:`Series.combine()` with scalar argument now works for any function type (:issue:`21248`)
- :meth:`Series.astype` and :meth:`DataFrame.astype` now dispatch to :meth:`ExtensionArray.astype` (:issue:`21185:`).
- Added :meth:`pandas.api.types.register_extension_dtype` to register an extension type with pandas (:issue:`22664`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W can remove this I think... integerArray is new in 0.24

- Bug in :meth:`pandas.core.ops.dispatch_to_extension_op` where addition of ``Series`` of ``IntegerArray`` and ``IntegerArray`` values raise runtime exception (:issue `22478`)

.. _whatsnew_0240.api.incompatibilities:

Expand Down
1 change: 1 addition & 0 deletions pandas/tests/arrays/test_integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ def test_cross_type_arithmetic():


def test_arith_extension_array_values():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the test to pandas/tests/extension/base/ops.py, as this is not a specific failure for IntegerArray, it is relevant for all extension types.

# GH 22478
s = pd.Series([1, 2, 3], dtype='Int64')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add the issue as a comment

result = s + s.values
expected = pd.Series([2, 4, 6], dtype='Int64')
Expand Down