Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 97234b5

Browse filesBrowse files
committed
Re-add some type checking to avoid FutureWarning w/ a Numpy array
1 parent 9ae7265 commit 97234b5
Copy full SHA for 97234b5

File tree

Expand file treeCollapse file tree

1 file changed

+5
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-6
lines changed

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -911,12 +911,11 @@ def _validate_linestyle(ls):
911911
the on-off ink sequences.
912912
"""
913913
# Look first for a valid named line style, like '--' or 'solid'
914-
try:
915-
return _validate_named_linestyle(ls)
916-
except (KeyError, AttributeError):
917-
# AttributeError may be raised by ls.lower() that can be called
918-
# inside _validate_named_linestyle.
919-
pass
914+
if isinstance(ls, six.string_types):
915+
try:
916+
return _validate_named_linestyle(ls)
917+
except (KeyError):
918+
pass
920919

921920
# On-off ink (in points) sequence *of even length*.
922921
# Offset is set to None.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.