Skip to content

Commit 413e7f5

Browse files
committed
remove no needed step
1 parent d1839d8 commit 413e7f5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/py_eddy_tracker/poly.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -714,12 +714,7 @@ def visvalingam(x, y, nb_pt=18):
714714
# in this case we replace two point
715715
i0, i2 = i_p, i_n
716716
heapq.heappush(h, (tri_area2(x, y, i0, i1, i2), (i0, i1, i2)))
717-
nb_out = 0
718-
for i in i_next:
719-
if i == -1:
720-
nb_out += 1
721-
nb_out += 1
722-
x_new, y_new = empty(nb_out, dtype=x.dtype), empty(nb_out, dtype=y.dtype)
717+
x_new, y_new = empty(nb_pt, dtype=x.dtype), empty(nb_pt, dtype=y.dtype)
723718
j = 0
724719
for i, i_n in enumerate(i_next):
725720
if i_n == -1:

0 commit comments

Comments
 (0)