Skip to content

Commit b2731b2

Browse files
committed
Fix documented dtype inputs for rfft-like functions
- Replace complex with real - Use must language instead of should
1 parent 8c42f02 commit b2731b2

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

src/array_api_stubs/_draft/fft.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,15 @@ def irfft(
296296
norm: Literal["backward", "ortho", "forward"] = "backward",
297297
) -> array:
298298
"""
299-
Computes the one-dimensional inverse of ``rfft`` for complex-valued input.
299+
Computes the one-dimensional inverse of ``rfft`` for real-valued input.
300300
301301
.. note::
302302
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.
303303
304304
Parameters
305305
----------
306306
x: array
307-
input array. Should have a complex-valued floating-point data type.
307+
input array. Must have a real-valued floating-point data type.
308308
n: int
309309
length of the transformed axis of the **output**. If
310310
@@ -405,15 +405,15 @@ def irfftn(
405405
norm: Literal["backward", "ortho", "forward"] = "backward",
406406
) -> array:
407407
"""
408-
Computes the n-dimensional inverse of ``rfftn`` for complex-valued input.
408+
Computes the n-dimensional inverse of ``rfftn`` for real-valued input.
409409
410410
.. note::
411411
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.
412412
413413
Parameters
414414
----------
415415
x: array
416-
input array. Should have a complex-valued floating-point data type.
416+
input array. Must have a real-valued floating-point data type.
417417
s: Sequence[int]
418418
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
419419

0 commit comments

Comments
 (0)