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

Skip to content

Commit d7a5c8e

Browse files
committed
Cast to integer in bezier for indexing
1 parent 82496ee commit d7a5c8e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/matplotlib/bezier.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def split_path_inout(path, inside, tolerence=0.01, reorder_inout=False):
256256

257257
for ctl_points, command in path_iter:
258258
iold = i
259-
i += len(ctl_points) / 2
259+
i += len(ctl_points) // 2
260260
if inside(ctl_points[-2:]) != begin_inside:
261261
bezier_path = concat([ctl_points_old[-2:], ctl_points])
262262
break
@@ -286,7 +286,6 @@ def split_path_inout(path, inside, tolerence=0.01, reorder_inout=False):
286286
verts_right = right[:]
287287

288288
#i += 1
289-
290289
if path.codes is None:
291290
path_in = Path(concat([path.vertices[:i], verts_left]))
292291
path_out = Path(concat([verts_right, path.vertices[i:]]))

0 commit comments

Comments
 (0)