Skip to content

Commit 5a51e6a

Browse files
committed
converted ps to array before slicing
1 parent d71ff49 commit 5a51e6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,7 @@ def _generate_normals(polygons):
12181218
v2 = np.empty((len(polygons), 3))
12191219
for poly_i, ps in enumerate(polygons):
12201220
n = len(ps)
1221+
ps = np.asarray(ps)
12211222
i1, i2, i3 = 0, n//3, 2*n//3
12221223
v1[poly_i, :] = ps[i1, :] - ps[i2, :]
12231224
v2[poly_i, :] = ps[i2, :] - ps[i3, :]

0 commit comments

Comments
 (0)