8000 Check if aspect is a string to avoid comparing numpy array to tuple o… · matplotlib/matplotlib@a33be77 · GitHub
[go: up one dir, main page]

Skip to content

Commit a33be77

Browse files
committed
Check if aspect is a string to avoid comparing numpy array to tuple of strings
1 parent 58a8334 commit a33be77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None):
12821282
etc.
12831283
===== =====================
12841284
"""
1285-
if aspect in ('equal', 'auto'):
1285+
if isinstance(aspect, str) and aspect in ('equal', 'auto'):
12861286
self._aspect = aspect
12871287
else:
12881288
self._aspect = float(aspect) # raise ValueError if necessary

0 commit comments

Comments
 (0)
0