-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix shape attribute for MultiIndex #8609
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
167ca28
to
06e7434
Compare
hmm these should be the same |
@jreback here's what I found on master:
|
this is a little odd because a MultiIndex is 1-d. So this could be a bit confusing. |
IMO MultiIndex can be unambiguously interpreted as a 1d array of tuples. I don't think it's surprising to have |
I know but you want to return |
Nope, I just want to return (len(idx),) On Fri, Oct 24, 2014 at 12:04 PM, jreback [email protected]
|
ahh, then this is indeed a missing component. ok, rebase and will put in |
Also added tests for other ndarray compat properties.
06e7434
to
1460552
Compare
rebased and green |
Fix shape attribute for MultiIndex
This fix ensures that
idx.shape == (len(idx),)
ifidx
is a MultiIndex.Also added tests for other ndarray compat properties.