-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: IntervalIndex.putmask with datetimelike dtypes #37968
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
try: | ||
value = self._data._validate_setitem_value(value) | ||
res_values.putmask(mask, value) |
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.
self._data
is defined as _data: ExtensionArray
Is ExtensionIndex only for ndarray backed ExtensionArray? or maybe will need catch AttributeError also eventually?
see also #35032 (comment) (sort of related).
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.
Ah my bad for not checking the code thoroughly before commenting and just looking at the diff.
I wasn't aware that you recently added a NDArrayBackedExtensionIndex.
Doesn't this add more complexity? what is the motivation for this?
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.
Doesn't this add more complexity? what is the motivation for this?
Its just taking methods that are duplicated in CategoricalIndex+DatetimeIndexOpsMixin and putting them in one place. I guess you could say that "adds complexity" bc there is an additional step in the inheritance chain?
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Implements
NDArrayBackedExtensionArray.putmask
which will hopefully be rolled into__array_function__
to simplify a bunch of code.