-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from Avasam/patch-1
complete `scipy.fft.dct`, and add relevant type aliases
- Loading branch information
Showing
2 changed files
with
46 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,88 @@ | ||
from scipy._typing import Untyped | ||
import numpy.typing as npt | ||
from numpy._typing import _ArrayLikeNumber_co | ||
from scipy._typing import DCTType, NormalizationMode, Untyped | ||
|
||
def dctn( | ||
x: Untyped, | ||
type: int = 2, | ||
type: DCTType = 2, | ||
s: Untyped | None = None, | ||
axes: Untyped | None = None, | ||
norm: Untyped | None = None, | ||
norm: NormalizationMode | None = None, | ||
overwrite_x: bool = False, | ||
workers: Untyped | None = None, | ||
workers: int | None = None, | ||
*, | ||
orthogonalize: Untyped | None = None, | ||
orthogonalize: bool | None = None, | ||
) -> Untyped: ... | ||
def idctn( | ||
x: Untyped, | ||
type: int = 2, | ||
type: DCTType = 2, | ||
s: Untyped | None = None, | ||
axes: Untyped | None = None, | ||
norm: Untyped | None = None, | ||
norm: NormalizationMode | None = None, | ||
overwrite_x: bool = False, | ||
workers: Untyped | None = None, | ||
orthogonalize: Untyped | None = None, | ||
workers: int | None = None, | ||
orthogonalize: bool | None = None, | ||
) -> Untyped: ... | ||
def dstn( | ||
x: Untyped, | ||
type: int = 2, | ||
type: DCTType = 2, | ||
s: Untyped | None = None, | ||
axes: Untyped | None = None, | ||
norm: Untyped | None = None, | ||
norm: NormalizationMode | None = None, | ||
overwrite_x: bool = False, | ||
workers: Untyped | None = None, | ||
orthogonalize: Untyped | None = None, | ||
workers: int | None = None, | ||
orthogonalize: bool | None = None, | ||
) -> Untyped: ... | ||
def idstn( | ||
x: Untyped, | ||
type: int = 2, | ||
type: DCTType = 2, | ||
s: Untyped | None = None, | ||
axes: Untyped | None = None, | ||
norm: Untyped | None = None, | ||
norm: NormalizationMode | None = None, | ||
overwrite_x: bool = False, | ||
workers: Untyped | None = None, | ||
orthogonalize: Untyped | None = None, | ||
workers: int | None = None, | ||
orthogonalize: bool | None = None, | ||
) -> Untyped: ... | ||
|
||
# We could use overloads based on the type of x to get more accurate return type | ||
# see https://github.com/jorenham/scipy-stubs/pull/118#discussion_r1807957439 | ||
def dct( | ||
x: Untyped, | ||
type: int = 2, | ||
n: Untyped | None = None, | ||
x: _ArrayLikeNumber_co, | ||
type: DCTType = 2, | ||
n: int | None = None, | ||
axis: int = -1, | ||
norm: Untyped | None = None, | ||
norm: NormalizationMode | None = None, | ||
overwrite_x: bool = False, | ||
workers: Untyped | None = None, | ||
orthogonalize: Untyped | None = None, | ||
) -> Untyped: ... | ||
workers: int | None = None, | ||
orthogonalize: bool | None = None, | ||
) -> npt.NDArray[Untyped]: ... | ||
def idct( | ||
x: Untyped, | ||
type: int = 2, | ||
n: Untyped | None = None, | ||
type: DCTType = 2, | ||
n: int | None = None, | ||
axis: int = -1, | ||
norm: Untyped | None = None, | ||
norm: NormalizationMode | None = None, | ||
overwrite_x: bool = False, | ||
workers: Untyped | None = None, | ||
orthogonalize: Untyped | None = None, | ||
workers: int | None = None, | ||
orthogonalize: bool | None = None, | ||
) -> Untyped: ... | ||
def dst( | ||
x: Untyped, | ||
type: int = 2, | ||
n: Untyped | None = None, | ||
type: DCTType = 2, | ||
n: int | None = None, | ||
axis: int = -1, | ||
norm: Untyped | None = None, | ||
norm: NormalizationMode | None = None, | ||
overwrite_x: bool = False, | ||
workers: Untyped | None = None, | ||
orthogonalize: Untyped | None = None, | ||
workers: int | None = None, | ||
orthogonalize: bool | None = None, | ||
) -> Untyped: ... | ||
def idst( | ||
x: Untyped, | ||
type: int = 2, | ||
n: Untyped | None = None, | ||
type: DCTType = 2, | ||
n: int | None = None, | ||
axis: int = -1, | ||
norm: Untyped | None = None, | ||
norm: NormalizationMode | None = None, | ||
overwrite_x: bool = False, | ||
workers: Untyped | None = None, | ||
orthogonalize: Untyped | None = None, | ||
workers: int | None = None, | ||
orthogonalize: bool | None = None, | ||
) -> Untyped: ... |