Skip to content

Commit 595fde3

Browse files
vicliu2001scottshambaugh
authored andcommitted
converted ps to array before slicing
1 parent cc82d4f commit 595fde3

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
@@ -1382,6 +1382,7 @@ def _generate_normals(polygons):
13821382
v2 = np.empty((len(polygons), 3))
13831383
for poly_i, ps in enumerate(polygons):
13841384
n = len(ps)
1385+
ps = np.asarray(ps)
13851386
i1, i2, i3 = 0, n//3, 2*n//3
13861387
v1[poly_i, :] = ps[i1, :] - ps[i2, :]
13871388
v2[poly_i, :] = ps[i2, :] - ps[i3, :]

0 commit comments

Comments
 (0)