diff --git a/autoarray/structures/mesh/delaunay_2d.py b/autoarray/structures/mesh/delaunay_2d.py index 3bd8cf466..a4086bab1 100644 --- a/autoarray/structures/mesh/delaunay_2d.py +++ b/autoarray/structures/mesh/delaunay_2d.py @@ -42,9 +42,12 @@ def scipy_delaunay(points_np, query_points_np, use_voronoi_areas, areas_factor): if use_voronoi_areas: - areas = voronoi_areas_numpy( - points, - ) + try: + areas = voronoi_areas_numpy(points) + except Exception as e: + # Qhull precision problems -> fallback + print(f"[pure_callback] Voronoi failed ({type(e).__name__}); falling back to barycentric areas.") + areas = barycentric_dual_area_from(points, simplices, xp=np) max_area = np.percentile(areas, 90.0)