-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: rename reduce-->do_reduce #27706
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
Changes from 13 commits
d660328
58b76e6
7a7eb32
ed3fb61
b750f06
64e9897
137acd3
6fd2096
84fbabc
e01f286
b809ac6
a6dc9e0
5b7a89f
d92da33
482f2d0
61f0241
5aa052b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,21 +57,10 @@ | |
class AttributesMixin: | ||
_data = None # type: np.ndarray | ||
|
||
@property | ||
def _attributes(self): | ||
# Inheriting subclass should implement _attributes as a list of strings | ||
raise AbstractMethodError(self) | ||
|
||
@classmethod | ||
def _simple_new(cls, values, **kwargs): | ||
raise AbstractMethodError(cls) | ||
|
||
def _get_attributes_dict(self): | ||
""" | ||
return an attributes dict for my class | ||
""" | ||
return {k: getattr(self, k, None) for k in self._attributes} | ||
|
||
@property | ||
def _scalar_type(self) -> Type[DatetimeLikeScalar]: | ||
"""The scalar associated with this datelike | ||
|
@@ -224,8 +213,8 @@ class TimelikeOps: | |
|
||
.. versionadded:: 0.24.0 | ||
|
||
nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta, \ | ||
default 'raise' | ||
nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta, | ||
default 'raise' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is for proper rendering with numpydoc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. darn, will revert. |
||
A nonexistent time does not exist in a particular timezone | ||
where clocks moved forward due to DST. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -328,7 +328,6 @@ class DatetimeArray(dtl.DatetimeLikeArrayMixin, dtl.TimelikeOps, dtl.DatelikeOps | |
# ----------------------------------------------------------------- | ||
# Constructors | ||
|
||
_attributes = ["freq", "tz"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you removing those attributes? (I suppose they are thus not used) It's a left-over from when it shared code with the Index? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. exactly, leftover from the inheritance days |
||
_dtype = None # type: Union[np.dtype, DatetimeTZDtype] | ||
_freq = None | ||
|
||
|
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.
I don't particular like this name, we don't have anywhere we call things do_*, how about
compute_reduction / apply_reduce
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.
sure
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.
(and its such an easy change to make because I can grep for it!)