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
Conversation
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. |
Can you just document the API change? |
If you add an |
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. |
FIX: Better test for isarray in figaspect(). Closes #5464.
FIX: Better test for isarray in figaspect(). Closes #5464.
cherry-picked back to v1.5.x as 98a5464 That is a gnarly API for specifying the aspect ratio.... |
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... |
Thank goodness that @fperez is insulated from api design these days 😇 |
No description provided.