Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Avoid comparing numpy array to strings in two places#7658
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
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.
Apart from the suggested change in implementation, this is good.
@@ -1282,7 +1282,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None): | |||
etc. | |||
===== ===================== | |||
""" | |||
if aspect in ('equal', 'auto'): | |||
ifisinstance(aspect, str) andaspect in ('equal', 'auto'): |
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.
It might be better to usecbook.is_string_like
instead ofis_instance
. Or at leastsix.string_types
in place ofstr
.
There was another similar warning coming up in in#5806 that I have also fixed. |
Test failures are unrelated (common random failures). |
LGTM 👍 |
Fixes#5806