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

Better test for isarray in figaspect(). Closes #5464. #5465

Merged
merged 2 commits into from Nov 18, 2015

Conversation

WeatherGod
Copy link
Member

No description provided.

@WeatherGod
Copy link
Member Author

Note that this change does change how the function errors if given a list or a tuple. Previously, it would error saying that it could not convert a list into a tuple. Now, it would give an attribute error. Don't know if anybody cares. It would be easy enough to put the attribute check back in.

@tacaswell tacaswell added this to the next bug fix release (2.0.1) milestone Nov 12, 2015
@tacaswell
Copy link
Member

Can you just document the API change?

@tacaswell
Copy link
Member

If you add an np.asarray around line 1771 lists/tuples should work fine as well?

@WeatherGod
Copy link
Member Author

Eh, rather than possibly causing an api change, I just added that attribute test back in (less to write and all that). I also added unit tests, which is always a good thing, right?

I am -0 on adding support for lists and tuples. This is for a bugfix, not for extending an API. Plus, I doubt very many people even use this function that way anyway.

tacaswell added a commit that referenced this pull request Nov 18, 2015
FIX: Better test for isarray in figaspect(). Closes #5464.
@tacaswell tacaswell merged commit 91ca2a3 into matplotlib:master Nov 18, 2015
tacaswell added a commit that referenced this pull request Nov 18, 2015
FIX: Better test for isarray in figaspect(). Closes #5464.
@tacaswell
Copy link
Member

cherry-picked back to v1.5.x as 98a5464

That is a gnarly API for specifying the aspect ratio....

@WeatherGod
Copy link
Member Author

Interestingly, looking at the history, the original API as done by Fernando back in 2005 was to only accept a 2D array. The option to support an number as an input came a few months later...

@tacaswell
Copy link
Member

Thank goodness that @fperez is insulated from api design these days 😇

@QuLogic QuLogic modified the milestones: v1.5.1, 2.0.1 (next bug fix release) Jul 18, 2016
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.

None yet

3 participants