Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Correct invocation of expand_dims #8610

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

Merged
merged 1 commit into from
May 12, 2017

Conversation

eric-wieser
Copy link
Contributor

@eric-wieser eric-wieser commented May 11, 2017

alpha is 2d, yet here it was requested to insert a fourth (not third) dimension.

This rightly produces an error in numpy 1.13.0rc1, although the final release might soften this to a deprecation warning to prevent breaking old version of matplotlib

`alpha` is 2d, yet here it was requested to insert a fourth dimension.

This rightly produces an error in numpy 1.13.0rc1, although we might soften this to a deprecation warning
Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. Apparently, in numpy < 1.13, expand_dims with axis > ndim is the same as -1.

@eric-wieser
Copy link
Contributor Author

Indeed, although I think that was accidental, rather than by design. I've filed an issue at numpy/numpy#9100 about restoring the old behaviour to keep old matplotlib working

@QuLogic QuLogic added this to the 2.0.3 (next bug fix release) milestone May 11, 2017
@tacaswell tacaswell modified the milestones: 2.0.3 (next bug fix release), 2.1 (next point release) May 12, 2017
@dstansby dstansby merged commit c3e24eb into matplotlib:master May 12, 2017
@eric-wieser
Copy link
Contributor Author

This is now fixed upstream in numpy to give a deprecation warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants