Skip to content

Commit 49dc841

Browse files
Also using numpy array of dataset in xgrid.search
1 parent 5b6cd83 commit 49dc841

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

parcels/xgrid.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ def _gtype(self):
212212
def search(self, z, y, x, ei=None):
213213
ds = self.xgcm_grid._ds
214214

215-
zi, zeta = _search_1d_array(ds.depth.values, z)
215+
zi, zeta = _search_1d_array(ds.depth.data, z)
216216

217217
if ds.lon.ndim == 1:
218-
yi, eta = _search_1d_array(ds.lat.values, y)
219-
xi, xsi = _search_1d_array(ds.lon.values, x)
218+
yi, eta = _search_1d_array(ds.lat.data, y)
219+
xi, xsi = _search_1d_array(ds.lon.data, x)
220220
return {"Z": (zi, zeta), "Y": (yi, eta), "X": (xi, xsi)}
221221

222222
yi, xi = None, None

0 commit comments

Comments
 (0)