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 : fix _reshape_2D bug with [(n, 1), ..] input #3284
Conversation
cbook._reshape_2D the input can be _at most_ 2D, however if it is passed a list of (n, 1) shaped ndarray this condition will be violated and it fails to work (which is less than great, but fine from a documentation stand point). However, boxplot _used_ to work with a list of such ndarrays (and users might expect to call a (n, 1) shaped array a 1D array). The added `ravel` makes sure that even if we get a list of any dimensional ndarrays in, the output will be a list of (n, ) shaped arrays. Closes matplotlib#3220
I will try to pull tests together for @phobson Comments? |
Note to self... this function needs serious commenting. Furthermore this function (as well as others elsewhere) will need to be updated to properly account for len()-able data types that don't implement As far as I can tell, this makes sense. |
This is set to merge into master, not 1.4.x. Was that intentional? |
nope, product of doing this too late at night. I can make a new PR targeted at 1.4, one of use can do the merged to 1.4 locally and then merge to master (which will auto-close this), or we can cherry-pick. Up to you @WeatherGod |
It is just a single commit. I'll cherry-pick it to 1.4.x after merging to master. |
BUG : fix _reshape_2D bug with [(n, 1), ..] input
BUG : fix _reshape_2D bug with [(n, 1), ..] input
Done |
BUG : fix _reshape_2D bug with [(n, 1), ..] input
cbook._reshape_2D
the input can be at most 2D, however if itis passed a list of (n, 1) shaped ndarray this condition will
be violated and it fails to work (which is less than great, but
fine from a documentation stand point). However, boxplot used
to work with a list of such ndarrays (and users might expect to
call a (n, 1) shaped array a 1D array). The added
ravel
makessure that even if we get a list of any dimensional ndarrays in, the
output will be a list of (n, ) shaped arrays.
Closes #3220