MCPcopy
hub / github.com/scikit-learn/scikit-learn / fft

Function fft

sklearn/externals/array_api_compat/common/_fft.py:13–25  ·  view source on GitHub ↗
(
    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
13def 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
27def ifft(
28 x: Array,

Callers 1

transformMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected