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 ae8931a

Browse filesBrowse files
committed
Make return value of _get_patch_verts always an array.
... instead of sometimes being a list. At least the implementation of bar3d assumes it's always an array (and the only other call site, in `patch_2d_to_3d`, doesn't care).
1 parent a5ea869 commit ae8931a
Copy full SHA for ae8931a

File tree

Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed

‎lib/mpl_toolkits/mplot3d/art3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/art3d.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,7 @@ def _get_patch_verts(patch):
393393
trans = patch.get_patch_transform()
394394
path = patch.get_path()
395395
polygons = path.to_polygons(trans)
396-
if len(polygons):
397-
return polygons[0]
398-
else:
399-
return []
396+
return polygons[0] if len(polygons) else np.array([])
400397

401398

402399
def patch_2d_to_3d(patch, z=0, zdir='z'):

0 commit comments

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