fix a warning when the aspect is a number#6279
fix a warning when the aspect is a number#6279kkdd wants to merge 2 commits intomatplotlib:masterfrom
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.
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]: import matplotlib.pyplot as plt
In [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 Caswell notifications@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):