Skip to content

MAINT, ENH: Implement calling pocketfft via gufunc and allow out argument #25536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
206 changes: 149 additions & 57 deletions numpy/fft/_pocketfft.py

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions numpy/fft/_pocketfft.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,31 @@ def fft(
n: None | int = ...,
axis: int = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def ifft(
a: ArrayLike,
n: None | int = ...,
axis: int = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def rfft(
a: ArrayLike,
n: None | int = ...,
axis: int = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def irfft(
a: ArrayLike,
n: None | int = ...,
axis: int = ...,
norm: _NormKind = ...,
out: None | NDArray[float64] = ...,
) -> NDArray[float64]: ...

# Input array must be compatible with `np.conjugate`
Expand All @@ -42,67 +46,77 @@ def hfft(
n: None | int = ...,
axis: int = ...,
norm: _NormKind = ...,
out: None | NDArray[float64] = ...,
) -> NDArray[float64]: ...

def ihfft(
a: ArrayLike,
n: None | int = ...,
axis: int = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def fftn(
a: ArrayLike,
s: None | Sequence[int] = ...,
axes: None | Sequence[int] = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def ifftn(
a: ArrayLike,
s: None | Sequence[int] = ...,
axes: None | Sequence[int] = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def rfftn(
a: ArrayLike,
s: None | Sequence[int] = ...,
axes: None | Sequence[int] = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def irfftn(
a: ArrayLike,
s: None | Sequence[int] = ...,
axes: None | Sequence[int] = ...,
norm: _NormKind = ...,
out: None | NDArray[float64] = ...,
) -> NDArray[float64]: ...

def fft2(
a: ArrayLike,
s: None | Sequence[int] = ...,
axes: None | Sequence[int] = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def ifft2(
a: ArrayLike,
s: None | Sequence[int] = ...,
axes: None | Sequence[int] = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def rfft2(
a: ArrayLike,
s: None | Sequence[int] = ...,
axes: None | Sequence[int] = ...,
norm: _NormKind = ...,
out: None | NDArray[complex128] = ...,
) -> NDArray[complex128]: ...

def irfft2(
a: ArrayLike,
s: None | Sequence[int] = ...,
axes: None | Sequence[int] = ...,
norm: _NormKind = ...,
out: None | NDArray[float64] = ...,
) -> NDArray[float64]: ...
Loading