Skip to content
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

BUG/PERF: Fixed IntervalIndex.nbytes and itemsize #20600

Closed

Conversation

TomAugspurger
Copy link
Contributor

Avoid materializing the ndarray of Intervals. Just get from left and right
instead.

Closes #19209

Avoid materializing the ndarray of Intervals. Just get from left and right
instead.

Closes pandas-dev#19209
@TomAugspurger TomAugspurger added the Interval Interval data type label Apr 4, 2018
Copy link
Contributor

@jreback jreback left a 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
Copy link
Contributor

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']
Copy link
Contributor

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
Copy link

codecov bot commented Apr 4, 2018

Codecov Report

Merging #20600 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20600      +/-   ##
==========================================
+ Coverage   91.84%   91.84%   +<.01%     
==========================================
  Files         153      153              
  Lines       49256    49260       +4     
==========================================
+ Hits        45241    45245       +4     
  Misses       4015     4015
Flag Coverage Δ
#multiple 90.23% <100%> (ø) ⬆️
#single 41.91% <50%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/interval.py 93.13% <100%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa3fefc...8bff87c. Read the comment docs.

@TomAugspurger
Copy link
Contributor Author

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).

@TomAugspurger
Copy link
Contributor Author

Closing in favor of #20611.

@TomAugspurger TomAugspurger deleted the interval-nbytes branch April 4, 2018 18:43
@TomAugspurger TomAugspurger added this to the No action milestone Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Interval Interval data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants