-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Conversation
Fixes at least one of the cases in #15553, will see if the others are already fixed+tested |
@@ -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() |
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.
ok, in the future let's refactor if possible.
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.
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, |
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.
also add issue numbers here for future reference (follown)
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
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.