Skip to content

BUG/Compat: dt64/td64 cummin, cummax on np 1.18 #30460

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 1 commit into from
Dec 25, 2019

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Dec 25, 2019

This also fixes+tests Series cummin/cummax with dt64tz, will have to look to see if there are any GH issues for that.

Following this and #29872 I think we should refactor a bunch of this out into core.nanops.

@jbrockmendel
Copy link
Member Author

Fixes at least one of the cases in #15553, will see if the others are already fixed+tested

@jreback jreback added Compat pandas objects compatability with Numpy or Python functions Timedelta Timedelta data type Datetime Datetime data dtype labels Dec 25, 2019
@jreback jreback added this to the 1.0 milestone Dec 25, 2019
@jreback jreback added the Bug label Dec 25, 2019
@@ -11131,11 +11131,35 @@ def cum_func(self, axis=None, skipna=True, *args, **kwargs):
axis = self._get_axis_number(axis)

y = com.values_from_object(self).copy()
d = self._construct_axes_dict()
Copy link
Contributor

Choose a reason for hiding this comment

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

ok, in the future let's refactor if possible.

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.

k thanks. if you think we need a release note pls add (followon), and of course refactors to make this code less complex a +

d["copy"] = False

if issubclass(y.dtype.type, (np.datetime64, np.timedelta64)):
# numpy 1.18 started sorting NaTs at the end instead of beginning,
Copy link
Contributor

Choose a reason for hiding this comment

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

also add issue numbers here for future reference (follown)

@jreback jreback merged commit f9eae2d into pandas-dev:master Dec 25, 2019
@jbrockmendel jbrockmendel deleted the compat-np18accum branch December 25, 2019 23:30
AlexKirko pushed a commit to AlexKirko/pandas that referenced this pull request Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Compat pandas objects compatability with Numpy or Python functions Datetime Datetime data dtype Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG/compat: accum funcs changed in numpy 1.18 BUG: Series.cumin/cummax fails with datetime64[ns, tz] dtype
2 participants