Function
fft
(
x: Array,
/,
xp: Namespace,
*,
n: int | None = None,
axis: int = -1,
norm: _Norm = "backward",
)
Source from the content-addressed store, hash-verified
| 11 | # complex128, which is why we require wrapping them all here. |
| 12 | |
| 13 | def fft( |
| 14 | x: Array, |
| 15 | /, |
| 16 | xp: Namespace, |
| 17 | *, |
| 18 | n: int | None = None, |
| 19 | axis: int = -1, |
| 20 | norm: _Norm = "backward", |
| 21 | ) -> Array: |
| 22 | res = xp.fft.fft(x, n=n, axis=axis, norm=norm) |
| 23 | if x.dtype in [xp.float32, xp.complex64]: |
| 24 | return res.astype(xp.complex64) |
| 25 | return res |
| 26 | |
| 27 | def ifft( |
| 28 | x: Array, |
Tested by
no test coverage detected