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