Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
fix a warning when the aspect is a number#6279
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
'1.2', name='normal', alternative='auto', obj_type='aspect') | ||
self._aspect = 'auto' | ||
else: | ||
raise ValueError("error in aspect") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Needs a better error message, but otherwise, this makes sense to me.
We don't see that warning in the tests. That probably means that there is no tests with aspect as a number. It would be good to add such a test |
Please reword your commit messages so that they indicate what you're actually doing instead of a generic "Update filename". |
I can not get this warning locally In [47]:importmatplotlib.pyplotaspltIn [48]:plt.axes().set_aspect(1)In [49]: |
It looks like this is a python2 only issue and just a warning. |
I am 👎 on merging this. |
how about a warning filter instead? On Fri, Apr 8, 2016 at 12:10 AM, Thomas A Caswellnotifications@github.com
|
Sorry. |
It seems to be a side effect of
|
It will happen when ever you try to compare a numpy type to a unicode string. I.e. it's not the cleanest and goes breaks normal python ducktypeing but gets the python2 behaviour closer to the python3 one. |
Closed by#7658. |
This PR fixes the following warning when using
plt.axes().set_aspect(1)
: