@@ -1107,7 +1107,7 @@ def __init__(self, verts, sizes=None, closed=True, **kwargs):
1107
1107
verts : list of array-like
1108
1108
The sequence of polygons [*verts0*, *verts1*, ...] where each
1109
1109
element *verts_i* defines the vertices of polygon *i* as a 2D
1110
- array-like of of shape (M, 2).
1110
+ array-like of shape (M, 2).
1111
1111
sizes : array-like, default: None
1112
1112
Squared scaling factors for the polygons. The coordinates of each
1113
1113
polygon *verts_i* are multiplied by the square-root of the
@@ -1134,7 +1134,7 @@ def set_verts(self, verts, closed=True):
1134
1134
verts : list of array-like
1135
1135
The sequence of polygons [*verts0*, *verts1*, ...] where each
1136
1136
element *verts_i* defines the vertices of polygon *i* as a 2D
1137
- array-like of of shape (M, 2).
1137
+ array-like of shape (M, 2).
1138
1138
closed : bool, default: True
1139
1139
Whether the polygon should be closed by adding a CLOSEPOLY
1140
1140
connection at the end.
@@ -1149,7 +1149,7 @@ def set_verts(self, verts, closed=True):
1149
1149
return
1150
1150
1151
1151
# Fast path for arrays
1152
- if isinstance (verts , np .ndarray ):
1152
+ if isinstance (verts , np .ndarray ) and len ( verts . shape ) == 3 :
1153
1153
verts_pad = np .concatenate ((verts , verts [:, :1 ]), axis = 1 )
1154
1154
# Creating the codes once is much faster than having Path do it
1155
1155
# separately each time by passing closed=True.
0 commit comments