Skip to content

Commit

Permalink
Warn if isign specified in ifft helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Oct 25, 2023
1 parent f4091c1 commit 0867c79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pytorch_finufft/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ def finuifft_type1(
Equivalent to :func:`~pytorch_finufft.functional.finufft_type1`,
but passing ``isign=1`` and dividing by the size of the output.
"""
if "isign" in finufftkwargs:
warnings.warn("finuifft_type1 recieved isign, which will be overwritten to 1")
finufftkwargs["isign"] = 1
res: torch.Tensor = finufft_type1(points, values, output_shape, **finufftkwargs)
res = res / res.numel()
Expand All @@ -554,6 +556,8 @@ def finuifft_type2(
Equivalent to :func:`~pytorch_finufft.functional.finufft_type2`,
but passing ``isign=1`` and dividing by the size of the output.
"""
if "isign" in finufftkwargs:
warnings.warn("finuifft_type2 recieved isign, which will be overwritten to 1")
finufftkwargs["isign"] = 1
res: torch.Tensor = finufft_type2(points, targets, **finufftkwargs)
res = res / res.numel()
Expand Down

0 comments on commit 0867c79

Please sign in to comment.