Skip to content

Commit eddb351

Browse files
Update function name to be consistent with (j,i) ordering
1 parent 120efff commit eddb351

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

parcels/spatialhash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _hash_index(self, coords):
9999
j, i = self._hash_index2d(coords)
100100
return i + self._nx * j
101101

102-
def _grid_ij_for_eid(self, eid):
102+
def _grid_ji_for_eid(self, eid):
103103
"""Returns the (i,j) grid coordinates for the given element id (eid)"""
104104
j = eid // (self._source_grid.xdim)
105105
i = eid - j * (self._source_grid.xdim)
@@ -176,7 +176,7 @@ def query(
176176

177177
for i, (coord, candidates) in enumerate(zip(coords, candidate_faces, strict=False)):
178178
for face_id in candidates:
179-
yi, xi = self._grid_ij_for_eid(face_id)
179+
yi, xi = self._grid_ji_for_eid(face_id)
180180
nodes = np.stack(
181181
(
182182
self._ybound[yi, xi, :],

0 commit comments

Comments
 (0)