10000 Make return value of _get_patch_verts always an array. · matplotlib/matplotlib@ae8931a · GitHub
[go: up one dir, main page]

Skip to content

Commit ae8931a

Browse 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

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines 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