Skip to content

Commit c069c66

Browse files
Fixing InvDistLandTracer interpolator when only one particle
Since not_all_land could then be [True], throwing an Index error later
1 parent ccb3b52 commit c069c66

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/parcels/interpolators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def XLinearInvdistLandTracer(
598598
all_land_mask = nb_land == 4 * lenZ * lenT
599599
values[all_land_mask] = 0.0
600600

601-
not_all_land = ~all_land_mask
601+
not_all_land = np.asarray(~all_land_mask, dtype=bool)
602602
if np.any(not_all_land):
603603
i_grid = np.arange(2)[None, None, None, :, None]
604604
j_grid = np.arange(2)[None, None, :, None, None]

0 commit comments

Comments
 (0)