|
1 | | -from scipy._typing import Untyped |
2 | | -from scipy.fft import fft as fft, ifft as ifft, next_fast_len as next_fast_len |
| 1 | +from collections.abc import Sequence |
3 | 2 |
|
4 | | -def czt_points(m, w: Untyped | None = None, a: complex = ...) -> Untyped: ... |
| 3 | +import numpy as np |
| 4 | +import numpy.typing as npt |
| 5 | +from numpy._typing import _ArrayLikeComplex_co |
| 6 | +from scipy._typing import AnyComplex, AnyReal |
| 7 | + |
| 8 | +__all__ = ["CZT", "ZoomFFT", "czt", "czt_points", "zoom_fft"] |
5 | 9 |
|
6 | 10 | class CZT: |
7 | | - def __init__(self, n, m: Untyped | None = None, w: Untyped | None = None, a: complex = ...): ... |
8 | | - def __call__(self, x, *, axis: int = -1) -> Untyped: ... |
9 | | - def points(self) -> Untyped: ... |
| 11 | + def __init__(self, n: int, m: int | None = None, w: AnyComplex | None = None, a: AnyComplex = 1 + 0j) -> None: ... |
| 12 | + def __call__(self, x: _ArrayLikeComplex_co, *, axis: int = -1) -> npt.NDArray[np.complex128 | np.complex64]: ... |
| 13 | + def points(self) -> npt.NDArray[np.complex128 | np.complex64]: ... |
10 | 14 |
|
11 | 15 | class ZoomFFT(CZT): |
12 | | - w: Untyped |
13 | | - a: Untyped |
14 | | - def __init__(self, n, fn, m: Untyped | None = None, *, fs: int = 2, endpoint: bool = False): ... |
| 16 | + w: complex |
| 17 | + a: complex |
| 18 | + |
| 19 | + m: int |
| 20 | + n: int |
| 21 | + |
| 22 | + f1: AnyReal |
| 23 | + f2: AnyReal |
| 24 | + fs: AnyReal |
| 25 | + |
| 26 | + def __init__( |
| 27 | + self, |
| 28 | + n: int, |
| 29 | + fn: Sequence[AnyReal] | AnyReal, |
| 30 | + m: int | None = None, |
| 31 | + *, |
| 32 | + fs: AnyReal = 2, |
| 33 | + endpoint: bool = False, |
| 34 | + ) -> None: ... |
15 | 35 |
|
16 | | -def czt(x, m: Untyped | None = None, w: Untyped | None = None, a: complex = ..., *, axis: int = -1) -> Untyped: ... |
17 | | -def zoom_fft(x, fn, m: Untyped | None = None, *, fs: int = 2, endpoint: bool = False, axis: int = -1) -> Untyped: ... |
| 36 | +def czt_points(m: int, w: AnyComplex | None = None, a: AnyComplex = ...) -> npt.NDArray[np.complex128 | np.complex64]: ... |
| 37 | +def czt( |
| 38 | + x: _ArrayLikeComplex_co, |
| 39 | + m: int | None = None, |
| 40 | + w: AnyComplex | None = None, |
| 41 | + a: AnyComplex = 1 + 0j, |
| 42 | + *, |
| 43 | + axis: int = -1, |
| 44 | +) -> npt.NDArray[np.complex128 | np.complex64]: ... |
| 45 | +def zoom_fft( |
| 46 | + x: _ArrayLikeComplex_co, |
| 47 | + fn: Sequence[AnyReal] | AnyReal, |
| 48 | + m: int | None = None, |
| 49 | + *, |
| 50 | + fs: int = 2, |
| 51 | + endpoint: bool = False, |
| 52 | + axis: int = -1, |
| 53 | +) -> npt.NDArray[np.float64 | np.float32 | np.complex128 | np.complex64]: ... |
0 commit comments