-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: Reshaping Series to its own shape raises TypeError #4554
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
Comments
actually....this should be changed entirely; something like this:
IOW a reshape that does nothing is ok, other wise you get back an a Series is by definition a 1-D object |
The current implementation (with the change I proposed) behaves well AFAICS:
and is pretty clear to me, except for the order check at the beginning which is irrelevant for my use cases. But yours passes these same tests so I would be happy with it and I think matplotlib would be as well. |
I think the order is just for compat with numpy |
Nitpicky: why not just add a comma at end instead of passing list to tuple |
This may be seen like a weird function call but it is actually triggered when plotting with development versions of matplotlib and the case is explicitly (and wrongly as it seems) by pandas:
It is easily fixed just replacing the offending line by this one:
return ndarray.reshape(self, newshape, order=order)
The text was updated successfully, but these errors were encountered: