-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
REF: Simplify Datetimelike constructor dispatching #23140
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 1 commit
f13cc58
4188ec7
7804f1b
a4775f4
8ee34fa
78943c1
aa71383
eae8389
e871733
7840f91
ec50b0b
eb7a6b6
32c6391
c903917
b97ec96
11db555
147de57
7c4d281
b90f421
dc4f474
46d5e64
b5827c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,27 +380,6 @@ def tz(self, value): | |
raise AttributeError("Cannot directly set timezone. Use tz_localize() " | ||
"or tz_convert() as appropriate") | ||
|
||
@property | ||
def size(self): | ||
# TODO: Remove this when we have a DatetimeTZArray | ||
# Necessary to avoid recursion error since DTI._values is a DTI | ||
# for TZ-aware | ||
return self._ndarray_values.size | ||
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? Those will need to be added back once we do the actual index/array split anyway, as they will be calling in the underlying array? 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.
Because I am OK with needing to add them back in a few days (hopefully) 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. But can you then try to explain me what the advantage is of moving it now? 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.
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.
As long as one of the index classes is still inheriting from the ArrayMixin, there will be wrong / strange mixups, that need to be cleaned up
But how would you do that if the underlying values don't yet have those attributes, because it is not yet our internal array class? And why not move them when implementing such a decorator? Then you actually have overview of the full changes. 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. You have sufficiently frustrated me into reverting this so we can move this down the field. 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. @jorisvandenbossche if you're still up, can you take a look at the newest push and verify that the parts you have a problem with have been removed? |
||
|
||
@property | ||
def shape(self): | ||
# TODO: Remove this when we have a DatetimeTZArray | ||
# Necessary to avoid recursion error since DTI._values is a DTI | ||
# for TZ-aware | ||
return self._ndarray_values.shape | ||
|
||
@property | ||
def nbytes(self): | ||
# TODO: Remove this when we have a DatetimeTZArray | ||
# Necessary to avoid recursion error since DTI._values is a DTI | ||
# for TZ-aware | ||
return self._ndarray_values.nbytes | ||
|
||
@classmethod | ||
def _cached_range(cls, start=None, end=None, periods=None, freq=None, | ||
name=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.
Is it needed to have the
_isnan
concept on the arrays? We use it in some internal methods on the Index class, but for Arrays it seems to me additional complexity compared to simply definingisna
appropriately on each Array ?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.
Discussed elsewhere; can we mark as resolved?