-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG/PERF: Fixed IntervalIndex.nbytes and itemsize #20600
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
Avoid materializing the ndarray of Intervals. Just get from left and right instead. Closes pandas-dev#19209
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.
maybe add an asv?
|
||
@property | ||
def itemsize(self): | ||
return self.left.itemsize + self.right.itemsize |
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.
this doesn’t really make sense to have
why do u need this?
@@ -24,6 +24,7 @@ def name(request): | |||
|
|||
class TestIntervalIndex(Base): | |||
_holder = IntervalIndex | |||
_compat_props = ['shape', 'ndim', 'size'] |
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.
what is this for? we don’t use it anywhere
Codecov Report
@@ Coverage Diff @@
## master #20600 +/- ##
==========================================
+ Coverage 91.84% 91.84% +<.01%
==========================================
Files 153 153
Lines 49256 49260 +4
==========================================
+ Hits 45241 45245 +4
Misses 4015 4015
Continue to review full report at Codecov.
|
Sorry, was just using this to demo stuff for a talk on OSS I gave last night. I think this will be solved by Interval being an ExtensionArray (should have that PR today). |
Closing in favor of #20611. |
Avoid materializing the ndarray of Intervals. Just get from left and right
instead.
Closes #19209