Skip to content

Commit

Permalink
FIX add remaining test case, 1d type 2
Browse files Browse the repository at this point in the history
  • Loading branch information
eickenberg committed Oct 5, 2023
1 parent 83ab0ba commit 4f58a58
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_1d/test_forward_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ def test_1d_t2_forward_CPU(targets: torch.Tensor):
0, abs=1e-05
)

abs_errors = torch.abs(finufft_out - against_torch)
l_inf_error = abs_errors.max()
l_2_error = torch.sqrt(torch.sum(abs_errors**2))
l_1_error = torch.sum(abs_errors)

assert l_inf_error < 3.5e-3 * N ** .6
assert l_2_error < 7.5e-4 * N ** 1.1
assert l_1_error < 5e-4 * N ** 1.6

# @pytest.mark.parametrize("values", cases)
# def test_1d_t3_forward_CPU(values: torch.Tensor) -> None:
Expand Down

0 comments on commit 4f58a58

Please sign in to comment.