Skip to content

Commit 065009c

Browse files
Jammy2211Jammy2211
authored andcommitted
remove where
1 parent 358a1e9 commit 065009c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autoarray/inversion/pixelization/border_relocator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,10 @@ def relocated_grid_via_ellipse_border_from(grid, origin, a, b, phi, xp=np, eps=1
311311

312312
moved = xp.stack([origin[0] + dy2, origin[1] + dx2], axis=1)
313313

314-
return moved
314+
# return xp.where(outside[:, None], moved, grid)
315+
316+
return grid + (moved - grid) * outside.astype(grid.dtype)[:, None]
315317

316-
return xp.where(outside[:, None], moved, grid)
317318

318319

319320
class BorderRelocator:

0 commit comments

Comments
 (0)