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 91df80b

Browse filesBrowse files
committed
Add short-circuit return if input is length 0
1 parent d181f63 commit 91df80b
Copy full SHA for 91df80b

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎lib/matplotlib/artist.py

Copy file name to clipboardExpand all lines: lib/matplotlib/artist.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,9 @@ def setp(obj, *args, **kwargs):
14271427
else:
14281428
objs = list(cbook.flatten(obj))
14291429

1430+
if not objs:
1431+
return
1432+
14301433
insp = ArtistInspector(objs[0])
14311434

14321435
# file has to be popped before checking if kwargs is empty

0 commit comments

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