Skip to content

Commit 8ee9b08

Browse files
Merge pull request #2159 from OceanParcels/minor_bug_xgrid_search
Fixing a small vectorization bug in xgrid search
2 parents e30adbe + 4f8de4e commit 8ee9b08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parcels/xgrid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def search(self, z, y, x, ei=None):
281281
if "Z" in self.axes:
282282
zi, zeta = _search_1d_array(ds.depth.values, z)
283283
else:
284-
zi, zeta = 0, 0.0
284+
zi, zeta = np.zeros(z.shape, dtype=int), np.zeros(z.shape, dtype=float)
285285

286286
if ds.lon.ndim == 1:
287287
yi, eta = _search_1d_array(ds.lat.values, y)

0 commit comments

Comments
 (0)