Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 72f2de3

Browse files
authored
Merge pull request #19248 from anntzer/gpv
Make return value of _get_patch_verts always an array.
2 parents 6d694cf + ae8931a commit 72f2de3

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

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)