8000 Make stem catch explicit Exception classes · matplotlib/matplotlib@94f640e · GitHub
[go: up one dir, main page]

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 94f640e

Browse files
committed
Make stem catch explicit Exception classes
1 parent db493b5 commit 94f640e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5115,7 +5115,7 @@ def stem(self, *args, **kwargs):
51155115
second = np.asarray(args[0], dtype=np.float)
51165116
x, y = y, second
51175117
args = args[1:]
5118-
except:
5118+
except (IndexError, ValueError):
51195119
# The second array doesn't make sense, or it doesn't exist
51205120
second = np.arange(len(y))
51215121
x = second

0 commit comments

Comments
 (0)
0