Skip to content
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]: ...