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

Fix infinite recursion in units with ndarray subclasses. #2591

Merged
merged 1 commit into from
Nov 14, 2013

Conversation

dopplershift
Copy link
Contributor

This was partially addressed for masked arrays in #2290. However,
this does not work for all ndarray sub-classes, like the quantities
package. The fix here is to make sure ravel is actually succeeding
in changing the shape of the object. If it doesn't just return
what we've got.

@mdboom
Copy link
Member

mdboom commented Nov 13, 2013

Thanks for the fix. This seems to break all of the regression tests for unit-related tests, however. You can download the results from Travis here: https://s3.amazonaws.com/matplotlib-test-results/artifacts/3031/3031.1/result_images.tar.bz2

@dopplershift
Copy link
Contributor Author

\me dons paper bag

That's what I get for assuming that "surely this can't break anything". I'll fix this up tonight.

This was partially addressed for masked arrays in matplotlib#2290. However,
this does not work for all ndarray sub-classes, like the quantities
package. The fix here is to make sure ravel is actually succeeding
in changing the shape of the object. If it doesn't just return
what we've got.
@dopplershift
Copy link
Contributor Author

Ok, now that I actually ran the tests, I saw them failing and now they pass--needed to check for the ndarray subclass before checking the shape.

mdboom added a commit that referenced this pull request Nov 14, 2013
Fix infinite recursion in units with ndarray subclasses.
@mdboom mdboom merged commit 21fd7c0 into matplotlib:master Nov 14, 2013
@mdboom
Copy link
Member

mdboom commented Nov 14, 2013

Cherry-picked to v1.3.x as 66647b0

mdboom added a commit that referenced this pull request Nov 14, 2013
Fix infinite recursion in units with ndarray subclasses.
@dopplershift dopplershift deleted the fix-infinite-recursion branch July 13, 2014 05:27
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.

2 participants