Skip to content

Commit

Permalink
fix unitt est
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Oct 30, 2024
1 parent 6ab7d3e commit 0cd96e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test_autoarray/inversion/inversion/test_mapper_valued.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,20 @@ def test__magnification_via_interpolation_from():
)

mapper = aa.m.MockMapper(
parameters=3,
parameters=4,
mask=mask,
interpolated_array=magnification,
mapping_matrix=np.ones((4, 3)),
mapping_matrix=np.ones((4, 4)),
)

mapper_valued = aa.MapperValued(values=np.array(magnification), mapper=mapper)

magnification = mapper_valued.magnification_via_interpolation_from()

assert magnification == pytest.approx(3.6666666666666665, 1.0e-4)
assert magnification == pytest.approx(4.0, 1.0e-4)

magnification = mapper_valued.magnification_via_interpolation_from(
shape_native=(3, 3), extent=(-1.0, 1.0, -1.0, 1.0)
)

assert magnification == pytest.approx(3.6666666666666665, 1.0e-4)
assert magnification == pytest.approx(4.0, 1.0e-4)

0 comments on commit 0cd96e2

Please sign in to comment.