Skip to content

Commit 12d7ee7

Browse files
Jammy2211Jammy2211
authored andcommitted
prevent negative areas, due to delaunay triangles at edge next to one another
1 parent 506fc64 commit 12d7ee7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

autoarray/structures/mesh/delaunay_2d.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def scipy_delaunay(points_np, query_points_np, use_voronoi_areas, areas_factor):
5959
xp=np,
6060
)
6161

62+
areas = np.maximum(areas, 0.0)
6263
split_point_areas = areas_factor * np.sqrt(areas)
64+
split_point_areas = np.where(np.isfinite(split_point_areas), split_point_areas, 0.0)
6365

6466
# ---------- Compute split cross points for Split regularization ----------
6567
split_points = split_points_from(

0 commit comments

Comments
 (0)