1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| from typing import Any, Final, TypeVar, overload
| from typing import Literal as L
|
| from numpy import complexfloating, floating, generic, integer
| from numpy._typing import (
| ArrayLike,
| NDArray,
| _ArrayLike,
| _ArrayLikeComplex_co,
| _ArrayLikeFloat_co,
| _ShapeLike,
| )
|
| __all__ = ["fftfreq", "fftshift", "ifftshift", "rfftfreq"]
|
| _ScalarT = TypeVar("_ScalarT", bound=generic)
|
| ###
|
| integer_types: Final[tuple[type[int], type[integer]]] = ...
|
| ###
|
| @overload
| def fftshift(x: _ArrayLike[_ScalarT], axes: _ShapeLike | None = None) -> NDArray[_ScalarT]: ...
| @overload
| def fftshift(x: ArrayLike, axes: _ShapeLike | None = None) -> NDArray[Any]: ...
|
| #
| @overload
| def ifftshift(x: _ArrayLike[_ScalarT], axes: _ShapeLike | None = None) -> NDArray[_ScalarT]: ...
| @overload
| def ifftshift(x: ArrayLike, axes: _ShapeLike | None = None) -> NDArray[Any]: ...
|
| #
| @overload
| def fftfreq(n: int | integer, d: _ArrayLikeFloat_co = 1.0, device: L["cpu"] | None = None) -> NDArray[floating]: ...
| @overload
| def fftfreq(n: int | integer, d: _ArrayLikeComplex_co = 1.0, device: L["cpu"] | None = None) -> NDArray[complexfloating]: ...
|
| #
| @overload
| def rfftfreq(n: int | integer, d: _ArrayLikeFloat_co = 1.0, device: L["cpu"] | None = None) -> NDArray[floating]: ...
| @overload
| def rfftfreq(n: int | integer, d: _ArrayLikeComplex_co = 1.0, device: L["cpu"] | None = None) -> NDArray[complexfloating]: ...
|
|