Skip to content

Commit 1528ff3

Browse files
committed
Backport rfft-like input dtype fixes
1 parent b2731b2 commit 1528ff3

File tree

1 file changed

+4
-4
lines changed
  • src/array_api_stubs/_2022_12

1 file changed

+4
-4
lines changed

src/array_api_stubs/_2022_12/fft.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,15 @@ def irfft(
279279
norm: Literal["backward", "ortho", "forward"] = "backward",
280280
) -> array:
281281
"""
282-
Computes the one-dimensional inverse of ``rfft`` for complex-valued input.
282+
Computes the one-dimensional inverse of ``rfft`` for real-valued input.
283283
284284
.. note::
285285
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.
286286
287287
Parameters
288288
----------
289289
x: array
290-
input array. Should have a complex-valued floating-point data type.
290+
input array. Must have a real-valued floating-point data type.
291291
n: int
292292
length of the transformed axis of the **output**. If
293293
@@ -388,15 +388,15 @@ def irfftn(
388388
norm: Literal["backward", "ortho", "forward"] = "backward",
389389
) -> array:
390390
"""
391-
Computes the n-dimensional inverse of ``rfftn`` for complex-valued input.
391+
Computes the n-dimensional inverse of ``rfftn`` for real-valued input.
392392
393393
.. note::
394394
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.
395395
396396
Parameters
397397
----------
398398
x: array
399-
input array. Should have a complex-valued floating-point data type.
399+
input array. Must have a real-valued floating-point data type.
400400
s: Sequence[int]
401401
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
402402

0 commit comments

Comments
 (0)