Skip to content
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

REGR: fix inplace operations for EAs with non-EA arg #37986

Merged
merged 15 commits into from
Nov 24, 2020

Conversation

arw2019
Copy link
Member

@arw2019 arw2019 commented Nov 21, 2020

@arw2019 arw2019 added ExtensionArray Extending pandas with custom dtypes or arrays. Regression Functionality that used to work in a prior pandas version labels Nov 21, 2020
@arw2019 arw2019 self-assigned this Nov 21, 2020
@simonjayhawkins simonjayhawkins added this to the 1.1.5 milestone Nov 21, 2020
@simonjayhawkins
Copy link
Member

@arw2019 can you add a release note to the regression section of doc\source\whatsnew\v1.1.5.rst

"ser1, ser2, expected_add, expected_sub, expected_mul",
(
[
Series([1], dtype="Int64"),
Copy link
Member

Choose a reason for hiding this comment

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

could you do the Series construction inside the test and just have the dtypes in the parameters?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

comment by @jbrockmendel

also needs a 1.1.5 release note

),
)
def test_series_inplace_ops(dtype1, dtype2, dtype_expected, dtype_mul):

Copy link
Member

Choose a reason for hiding this comment

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

GH ref to either this PR or original issue

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -17,7 +17,7 @@ Fixed regressions
- Regression in addition of a timedelta-like scalar to a :class:`DatetimeIndex` raising incorrectly (:issue:`37295`)
- Fixed regression in :meth:`Series.groupby` raising when the :class:`Index` of the :class:`Series` had a tuple as its name (:issue:`37755`)
- Fixed regression in :meth:`DataFrame.loc` and :meth:`Series.loc` for ``__setitem__`` when one-dimensional tuple was given to select from :class:`MultiIndex` (:issue:`37711`)
-
- Fixed regression in inplace operations on :class:``ExtensionArray`` with NumPy array argument (:issue:`37910`)
Copy link
Member

Choose a reason for hiding this comment

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

is it on EA or on Series with EA dtype?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's Series with EA dtype

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah let's reword this, its an inplace operation on a Series with an EA dtype with a numpyt dtyped operand

Copy link
Member Author

Choose a reason for hiding this comment

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

Rewritten

@@ -17,7 +17,7 @@ Fixed regressions
- Regression in addition of a timedelta-like scalar to a :class:`DatetimeIndex` raising incorrectly (:issue:`37295`)
- Fixed regression in :meth:`Series.groupby` raising when the :class:`Index` of the :class:`Series` had a tuple as its name (:issue:`37755`)
- Fixed regression in :meth:`DataFrame.loc` and :meth:`Series.loc` for ``__setitem__`` when one-dimensional tuple was given to select from :class:`MultiIndex` (:issue:`37711`)
-
- Fixed regression in inplace operations on :class:``ExtensionArray`` with NumPy array argument (:issue:`37910`)
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah let's reword this, its an inplace operation on a Series with an EA dtype with a numpyt dtyped operand

pandas/tests/series/test_arithmetic.py Show resolved Hide resolved
Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM

@jreback jreback merged commit 20f7ffa into pandas-dev:master Nov 24, 2020
@jreback
Copy link
Contributor

jreback commented Nov 24, 2020

thanks @arw2019

@simonjayhawkins
Copy link
Member

@meeseeksdev backport 1.1.x

@lumberbot-app

This comment has been minimized.

simonjayhawkins pushed a commit to simonjayhawkins/pandas that referenced this pull request Nov 24, 2020
simonjayhawkins added a commit that referenced this pull request Nov 25, 2020
…EAs with non-EA arg (#38035)

Co-authored-by: Andrew Wieteska <48889395+arw2019@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: EA inplace add (and other ops) with non-EA arg broken
4 participants