Skip to content
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

Fix documented dtype inputs for rfft-like functions #696

Closed
wants to merge 2 commits into from
Closed
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
8 changes: 4 additions & 4 deletions src/array_api_stubs/_2022_12/fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@ def irfft(
norm: Literal["backward", "ortho", "forward"] = "backward",
) -> array:
"""
Computes the one-dimensional inverse of ``rfft`` for complex-valued input.
Computes the one-dimensional inverse of ``rfft`` for real-valued input.

.. note::
Applying the one-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfft(rfft(x)) == x``), provided that the transform and inverse transform are performed with the same arguments (axis and normalization mode) and consistent length.

Parameters
----------
x: array
input array. Should have a complex-valued floating-point data type.
input array. Must have a real-valued floating-point data type.
n: int
length of the transformed axis of the **output**. If

Expand Down Expand Up @@ -388,15 +388,15 @@ def irfftn(
norm: Literal["backward", "ortho", "forward"] = "backward",
) -> array:
"""
Computes the n-dimensional inverse of ``rfftn`` for complex-valued input.
Computes the n-dimensional inverse of ``rfftn`` for real-valued input.

.. note::
Applying the n-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfftn(rfftn(x)) == x``), provided that the transform and inverse transform are performed with the same arguments (axes and normalization mode) and consistent sizes.

Parameters
----------
x: array
input array. Should have a complex-valued floating-point data type.
input array. Must have a real-valued floating-point data type.
s: Sequence[int]
size of each transformed axis of the **output**. ``n=s[i]`` is also the number of input points used along the axis (dimension) ``i``, except for the last axis, where ``n=s[-1]//2+1`` points of the input are used. If

Expand Down
8 changes: 4 additions & 4 deletions src/array_api_stubs/_draft/fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,15 @@ def irfft(
norm: Literal["backward", "ortho", "forward"] = "backward",
) -> array:
"""
Computes the one-dimensional inverse of ``rfft`` for complex-valued input.
Computes the one-dimensional inverse of ``rfft`` for real-valued input.

.. note::
Applying the one-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfft(rfft(x)) == x``), provided that the transform and inverse transform are performed with the same arguments (axis and normalization mode) and consistent length.

Parameters
----------
x: array
input array. Should have a complex-valued floating-point data type.
input array. Must have a real-valued floating-point data type.
n: int
length of the transformed axis of the **output**. If

Expand Down Expand Up @@ -405,15 +405,15 @@ def irfftn(
norm: Literal["backward", "ortho", "forward"] = "backward",
) -> array:
"""
Computes the n-dimensional inverse of ``rfftn`` for complex-valued input.
Computes the n-dimensional inverse of ``rfftn`` for real-valued input.

.. note::
Applying the n-dimensional inverse discrete Fourier transform for real-valued input to the output of this function must return the original (i.e., non-transformed) input array within numerical accuracy (i.e., ``irfftn(rfftn(x)) == x``), provided that the transform and inverse transform are performed with the same arguments (axes and normalization mode) and consistent sizes.

Parameters
----------
x: array
input array. Should have a complex-valued floating-point data type.
input array. Must have a real-valued floating-point data type.
s: Sequence[int]
size of each transformed axis of the **output**. ``n=s[i]`` is also the number of input points used along the axis (dimension) ``i``, except for the last axis, where ``n=s[-1]//2+1`` points of the input are used. If

Expand Down