Skip to content

Commit 92b6b49

Browse files
Ensure last exis stack in points construction for barycentric coordinates
1 parent bec6188 commit 92b6b49

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

parcels/_index_search.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def uxgrid_point_in_cell(grid, y: np.ndarray, x: np.ndarray, yi: np.ndarray, xi:
178178
),
179179
axis=-1,
180180
)
181-
points = np.stack((x, y))
181+
points = np.stack((x, y), axis=-1)
182182

183183
M = len(points)
184184

@@ -206,9 +206,6 @@ def _triangle_area(A, B, C):
206206
raise ValueError(f"Expected last dim=2 or 3, got {A.shape[-1]}")
207207

208208
return area
209-
# d3 = np.cross(d1, d2, axis=-1)
210-
# breakpoint()
211-
# return 0.5 * np.linalg.norm(d3, axis=-1)
212209

213210

214211
def _barycentric_coordinates(nodes, points, min_area=1e-8):

0 commit comments

Comments
 (0)