Skip to content

Commit 54133f2

Browse files
Jammy2211Jammy2211
authored andcommitted
another hot fix
1 parent e44c685 commit 54133f2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

autoarray/inversion/pixelization/border_relocator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,11 @@ def relocated_grid_via_ellipse_border_from(grid, origin, a, b, phi, xp=np, eps=1
296296
yprime = -s * dx + c * dy
297297

298298
# ellipse radius in normalized coords
299+
299300
q = (xprime / a) ** 2 + (yprime / b) ** 2
300301

301302
outside = q > 1.0
303+
q = xp.where(xp.isfinite(q), q, 1.0)
302304
scale = 1.0 / xp.sqrt(xp.maximum(q, 1.0))
303305
scale = xp.minimum(scale, 1.0)
304306

0 commit comments

Comments
 (0)