Skip to content

Commit f122dbd

Browse files
committed
remove only_bigger for numba compilation problem
1 parent 3819ca7 commit f122dbd

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/py_eddy_tracker/dataset/grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def eddy_identification(
635635
# Compute ssh contour
636636
self.contours = Contours(x, y, data, levels, wrap_x=self.is_circular())
637637

638-
out_sampling = dict(fixed_size=sampling, only_bigger=False)
638+
out_sampling = dict(fixed_size=sampling)
639639
track_extra_variables = [
640640
"height_max_speed_contour",
641641
"height_external_contour",

src/py_eddy_tracker/generic.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,21 +269,13 @@ def fit_circle(x_vec, y_vec):
269269

270270

271271
@njit(cache=True, fastmath=True)
272-
def uniform_resample(x_val, y_val, num_fac=2, fixed_size=None, only_bigger=False):
272+
def uniform_resample(x_val, y_val, num_fac=2, fixed_size=None):
273273
"""
274274
Resample contours to have (nearly) equal spacing
275275
x_val, y_val : input contour coordinates
276276
num_fac : factor to increase lengths of output coordinates
277277
"""
278278
nb = x_val.shape[0]
279-
if only_bigger and fixed_size is not None and nb <= fixed_size:
280-
x_new = empty(fixed_size, dtype=x_val.dtype)
281-
y_new = empty(fixed_size, dtype=y_val.dtype)
282-
x_new[:nb] = x_val
283-
y_new[:nb] = y_val
284-
x_new[nb:] = x_val[-1]
285-
y_new[nb:] = y_val[-1]
286-
return x_new, y_new
287279
# Get distances
288280
dist = empty(nb)
289281
dist[0] = 0

0 commit comments

Comments
 (0)