Skip to content

Commit

Permalink
Merge pull request #88 from flatironinstitute/ref/remove-unused-out-p…
Browse files Browse the repository at this point in the history
…aram

Remove unused 'out' argument
  • Loading branch information
eickenberg authored Oct 16, 2023
2 parents bc53001 + ad63d69 commit 11cc785
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 18 deletions.
11 changes: 0 additions & 11 deletions pytorch_finufft/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,12 @@ def forward( # type: ignore[override]
points: torch.Tensor,
values: torch.Tensor,
output_shape: Union[int, Tuple[int, int], Tuple[int, int, int]],
out: Optional[torch.Tensor] = None,
finufftkwargs: Optional[Dict[str, Union[int, float]]] = None,
) -> torch.Tensor:
"""
Evaluates the Type 1 NUFFT on the inputs.
"""

if out is not None:
# All this requires is a check on the out array to make sure it is the
# correct shape.
raise NotImplementedError("In-place results are not yet implemented")

checks.check_devices(values, points)
checks.check_dtypes(values, points, "Values")
checks.check_sizes_t1(values, points)
Expand Down Expand Up @@ -197,7 +191,6 @@ def forward( # type: ignore[override]
ctx: Any,
points: torch.Tensor,
targets: torch.Tensor,
out: Optional[torch.Tensor] = None,
finufftkwargs: Optional[Dict[str, Union[int, float]]] = None,
) -> torch.Tensor:
"""
Expand Down Expand Up @@ -230,10 +223,6 @@ def forward( # type: ignore[override]
------
"""

if out is not None:
raise NotImplementedError("In-place results are not yet implemented")

checks.check_devices(targets, points)
checks.check_dtypes(targets, points, "Targets")
checks.check_sizes_t2(targets, points)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_1d/test_backward_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def func(points, values):
points,
values,
(N + modifier,),
None,
dict(modeord=int(not fftshift), isign=isign),
)

Expand Down Expand Up @@ -114,7 +113,6 @@ def func(points, targets):
return pytorch_finufft.functional.finufft_type2.apply(
points,
targets,
None,
dict(modeord=int(not fftshift), isign=isign),
)

Expand Down
2 changes: 0 additions & 2 deletions tests/test_2d/test_backward_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def func(points, values):
points,
values,
(N, N + modifier),
None,
dict(modeord=int(not fftshift), isign=isign),
)

Expand Down Expand Up @@ -125,7 +124,6 @@ def func(points, targets):
return pytorch_finufft.functional.finufft_type2.apply(
points,
targets,
None,
dict(modeord=int(not fftshift), isign=isign),
)

Expand Down
1 change: 0 additions & 1 deletion tests/test_2d/test_forward_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def test_t2_forward_CPU(N: int, fftshift: bool) -> None:
finufft_out = pytorch_finufft.functional.finufft_type2.apply(
points,
targets,
None,
{"modeord": int(not fftshift)},
)

Expand Down
2 changes: 0 additions & 2 deletions tests/test_3d/test_backward_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def func(points, values):
points,
values,
(N, N + modifier, N + 2 * modifier),
None,
dict(modeord=int(not fftshift), isign=isign),
)

Expand Down Expand Up @@ -122,7 +121,6 @@ def func(points, targets):
return pytorch_finufft.functional.finufft_type2.apply(
points,
targets,
None,
dict(modeord=int(not fftshift), isign=isign),
)

Expand Down

0 comments on commit 11cc785

Please sign in to comment.