Skip to content

Commit bb41d60

Browse files
author
Niek Wielders
committed
prevent theta=0
1 parent 0579846 commit bb41d60

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • autogalaxy/profiles/mass/dark

autogalaxy/profiles/mass/dark/cnfw.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def deflections_yx_2d_from(self, grid: aa.type.Grid2DLike, xp=np, **kwargs):
6060
The numerical backend to use, either `numpy` or `jax.numpy`.
6161
"""
6262
theta = self.radial_grid_from(grid=grid, xp=xp, **kwargs).array
63-
63+
theta = xp.maximum(theta, 1e-8)
64+
6465
factor = (
6566
4.0
6667
* self.kappa_s

0 commit comments

Comments
 (0)