Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

complete scipy.signal._savitzky_golay #124

Merged
merged 4 commits into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions scipy-stubs/signal/_savitzky_golay.pyi
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
from scipy._typing import Untyped, UntypedArray
from typing import Literal, TypeAlias

import numpy as np
import numpy.typing as npt
import optype as op

_Array_f_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.floating[npt.NBitBase]]]
_Mode: TypeAlias = Literal["mirror", "constant", "nearest", "wrap", "interp"]

def savgol_coeffs(
window_length: int,
polyorder: int,
deriv: int = 0,
delta: float = 1.0,
pos: int | None = None,
use: str = "conv",
) -> UntypedArray: ...
use: Literal["conv", "dot"] = "conv",
) -> _Array_f_1d: ...
def savgol_filter(
x: Untyped,
x: npt.ArrayLike,
window_length: int,
polyorder: int,
deriv: int = 0,
delta: float = 1.0,
axis: int = -1,
mode: str = "interp",
axis: op.CanIndex = -1,
mode: _Mode = "interp",
cval: float = 0.0,
) -> UntypedArray: ...
) -> npt.NDArray[np.float32 | np.float64]: ...