Skip to content

Commit

Permalink
signal: Add return type annotation for savgol_coeffs
Browse files Browse the repository at this point in the history
In the file `_savitzky_golay.pyi`.

Additionally add `Literal` type annotation for the `use` parameter which
can only be "conv" or "dot".
  • Loading branch information
pavyamsiri committed Oct 21, 2024
1 parent 859f44d commit 0be31f3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scipy-stubs/signal/_savitzky_golay.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
from typing import Literal, TypeAlias

import numpy as np
import numpy.typing as npt
from scipy._typing import Untyped, UntypedArray

_Array_fc_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.inexact[npt.NBitBase]]]

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_fc_1d: ...
def savgol_filter(
x: Untyped,
window_length: int,
Expand Down

0 comments on commit 0be31f3

Please sign in to comment.