Skip to content

👽️ signal: 1.15.0 support #348

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

Merged
merged 6 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
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
46 changes: 12 additions & 34 deletions .mypyignore-todo
Original file line number Diff line number Diff line change
@@ -1,62 +1,40 @@
scipy\.signal\._bsplines
scipy\.signal\._spectral
scipy\.signal\.(_?filter_design\.)?__all__
scipy\.signal\.(_?filter_design\.)?freqz_sos
scipy\.signal\.(_?signaltools\.)?__all__
scipy\.signal\.(_?signaltools\.)?cmplx_sort
scipy\.signal\.(_?signaltools\.)?envelope
scipy\.signal\.(_spectral_py\.)?lombscargle
scipy\.signal\.(_?waveforms\.)?chirp
scipy\.signal\.(_?wavelets\.)?__all__
scipy\.signal\.(_?wavelets\.)?cascade
scipy\.signal\.(_?wavelets\.)?cwt
scipy\.signal\.(_?wavelets\.)?daub
scipy\.signal\.(_?wavelets\.)?morlet2?
scipy\.signal\.(_?wavelets\.)?qmf
scipy\.signal\.(_?wavelets\.)?ricker
scipy\.signal\.(spectral\.)?lombscargle
scipy\.signal\._?spline\.(c|q)spline2d
scipy\.signal\._?spline\.symiirorder(1|2)
scipy\.signal\._spline\.symiirorder1_ic
scipy\.signal\._spline\.symiirorder2_ic_(bwd|fwd)
scipy\.signal\.(spline|wavelets)\.__all__
scipy\.signal\.wavelets\.convolve

scipy\.sparse\.__all__
scipy\.sparse\._sputils\.__all__
scipy\.sparse\._(data\._data|compressed\._cs)_matrix\.__init__
scipy\.sparse\._(base\._sp|bsr\._bsr_|coo\._coo_|dia\._dia_|dok\._dok_|lil\._lil_)base\.__init__
scipy\.sparse\._(base\._sp|coo\._coo_|dia\._dia_|dok\._dok_|lil\._lil_)base\.count_nonzero
scipy\.sparse\.((_?base|_matrix|bsr|coo|csc|csr|dia|dok)\.)?spmatrix\.todense
scipy\.sparse\.(_?construct\.)?rand(om(_array)?)?
scipy\.sparse\._coo\._coo_base\.tensordot
scipy\.sparse\._data\._minmax_mixin\.(arg|nan)?(max|min)
scipy\.sparse\._sputils\.__all__
scipy\.sparse\._sputils\.broadcast_shapes
scipy\.sparse\.(_sputils|base|compressed|bsr|coo|dia|dok)\.check_shape
scipy\.sparse\.(_sputils|compressed|bsr|coo|dia|dok)\.isshape
scipy\.sparse\.csgraph\.(_matching\.)?min_weight_full_bipartite_matching
scipy\.sparse\.get_index_dtype
scipy\.sparse\.safely_cast_index_arrays

scipy\.sparse\.csgraph\.(_matching\.)?min_weight_full_bipartite_matching

scipy\.sparse\.linalg\._dsolve\.linsolve\.__all__
scipy\.sparse\.linalg\._dsolve\.linsolve\.is_sptriangular
scipy\.sparse\.linalg\._dsolve\.linsolve\.spbandwidth
scipy\.sparse\.linalg\.(_dsolve\.(linsolve\.)?)?splu
scipy\.sparse\.linalg\.(_?eigen\.(_svds\.)?)?svds
scipy\.sparse\.safely_cast_index_arrays


scipy\.spatial\.distance\.directed_hausdorff
scipy\.spatial\.transform\.(_?rotation\.)?Rotation\.random


scipy\.special\.(cython_special\.)?btdtri?
scipy\.special\.(assoc_)?legendre_p(_all)?
scipy\.special\.sph_(harm_y|legendre_p)(_all)?
scipy\.special\.(_basic\.)?__all__
scipy\.special\.(_?basic\.)?factorial
scipy\.special\.(_?basic\.)?factorial2
scipy\.special\.(_?basic\.)?factorialk
scipy\.special\.(_basic\.)?softplus
scipy\.special\.(cython_special\.)?btdtr
scipy\.special\.(cython_special\.)?btdtri
scipy\.special\.(_?basic\.)?factorial(2|k)?
scipy\.special\._spherical_bessel\.spherical_kn_reflection
scipy\.special\._spherical_bessel\.use_reflection
scipy\.special\.(assoc_)?legendre_p(_all)?
scipy\.special\.sph_(harm_y|legendre_p)(_all)?


scipy\.stats\.__all__
scipy\.stats\.distributions\.__all__
Expand Down
145 changes: 124 additions & 21 deletions scipy-stubs/signal/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,131 @@ from . import (
wavelets,
windows,
)
from ._bsplines import *
from ._czt import *
from ._filter_design import *
from ._fir_filter_design import *
from ._lti_conversion import *
from ._ltisys import *
from ._czt import CZT, ZoomFFT, czt, czt_points, zoom_fft
from ._filter_design import (
BadCoefficients,
band_stop_obj,
bessel,
besselap,
bilinear,
bilinear_zpk,
buttap,
butter,
buttord,
cheb1ap,
cheb1ord,
cheb2ap,
cheb2ord,
cheby1,
cheby2,
ellip,
ellipap,
ellipord,
findfreqs,
freqs,
freqs_zpk,
freqz,
freqz_sos,
freqz_zpk,
gammatone,
group_delay,
iircomb,
iirdesign,
iirfilter,
iirnotch,
iirpeak,
lp2bp,
lp2bp_zpk,
lp2bs,
lp2bs_zpk,
lp2hp,
lp2hp_zpk,
lp2lp,
lp2lp_zpk,
normalize,
sos2tf,
sos2zpk,
sosfreqz,
tf2sos,
tf2zpk,
zpk2sos,
zpk2tf,
)
from ._fir_filter_design import firls, firwin, firwin2, kaiser_atten, kaiser_beta, kaiserord, minimum_phase, remez
from ._lti_conversion import abcd_normalize, cont2discrete, ss2tf, ss2zpk, tf2ss, zpk2ss
from ._ltisys import (
StateSpace,
TransferFunction,
ZerosPolesGain,
bode,
dbode,
dfreqresp,
dimpulse,
dlsim,
dlti,
dstep,
freqresp,
impulse,
lsim,
lti,
place_poles,
step,
)
from ._max_len_seq import max_len_seq
from ._peak_finding import *
from ._peak_finding import argrelextrema, argrelmax, argrelmin, find_peaks, find_peaks_cwt, peak_prominences, peak_widths
from ._savitzky_golay import savgol_coeffs, savgol_filter
from ._short_time_fft import *
from ._signaltools import *
from ._spectral_py import *
from ._spline import cspline2d, qspline2d, sepfir2d, symiirorder1, symiirorder2
from ._short_time_fft import ShortTimeFFT
from ._signaltools import (
choose_conv_method,
convolve,
convolve2d,
correlate,
correlate2d,
correlation_lags,
decimate,
deconvolve,
detrend,
envelope,
fftconvolve,
filtfilt,
hilbert,
hilbert2,
invres,
invresz,
lfilter,
lfilter_zi,
lfiltic,
medfilt,
medfilt2d,
oaconvolve,
order_filter,
resample,
resample_poly,
residue,
residuez,
sosfilt,
sosfilt_zi,
sosfiltfilt,
unique_roots,
vectorstrength,
wiener,
)
from ._spectral_py import check_COLA, check_NOLA, coherence, csd, istft, lombscargle, periodogram, spectrogram, stft, welch
from ._spline import sepfir2d
from ._spline_filters import (
cspline1d,
cspline1d_eval,
cspline2d,
gauss_spline,
qspline1d,
qspline1d_eval,
qspline2d,
spline_filter,
symiirorder1,
symiirorder2,
)
from ._upfirdn import upfirdn
from ._waveforms import *
from ._wavelets import *
from ._waveforms import chirp, gausspulse, sawtooth, square, sweep_poly, unit_impulse
from .windows import get_window

__all__ = [
Expand All @@ -51,7 +160,6 @@ __all__ = [
"buttap",
"butter",
"buttord",
"cascade",
"cheb1ap",
"cheb1ord",
"cheb2ap",
Expand All @@ -62,7 +170,6 @@ __all__ = [
"check_NOLA",
"chirp",
"choose_conv_method",
"cmplx_sort",
"coherence",
"cont2discrete",
"convolve",
Expand All @@ -74,10 +181,8 @@ __all__ = [
"cspline1d",
"cspline1d_eval",
"cspline2d",
"cwt",
"czt",
"czt_points",
"daub",
"dbode",
"decimate",
"deconvolve",
Expand All @@ -90,6 +195,7 @@ __all__ = [
"ellip",
"ellipap",
"ellipord",
"envelope",
"fftconvolve",
"filter_design",
"filtfilt",
Expand All @@ -104,6 +210,7 @@ __all__ = [
"freqs",
"freqs_zpk",
"freqz",
"freqz_sos",
"freqz_zpk",
"gammatone",
"gauss_spline",
Expand Down Expand Up @@ -144,16 +251,13 @@ __all__ = [
"medfilt",
"medfilt2d",
"minimum_phase",
"morlet",
"morlet2",
"normalize",
"oaconvolve",
"order_filter",
"peak_prominences",
"peak_widths",
"periodogram",
"place_poles",
"qmf",
"qspline1d",
"qspline1d_eval",
"qspline2d",
Expand All @@ -162,7 +266,6 @@ __all__ = [
"resample_poly",
"residue",
"residuez",
"ricker",
"savgol_coeffs",
"savgol_filter",
"sawtooth",
Expand Down
34 changes: 0 additions & 34 deletions scipy-stubs/signal/_bsplines.pyi

This file was deleted.

7 changes: 5 additions & 2 deletions scipy-stubs/signal/_filter_design.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ __all__ = [
"freqs",
"freqs_zpk",
"freqz",
"freqz_sos",
"freqz_zpk",
"gammatone",
"group_delay",
Expand Down Expand Up @@ -161,20 +162,22 @@ def group_delay(

#
@overload # worN: real
def sosfreqz(
def freqz_sos(
sos: onp.ToFloat2D,
worN: op.CanIndex | onp.ToFloat1D = 512,
whole: op.CanBool = False,
fs: onp.ToFloat = ..., # 2 * pi
) -> tuple[_Float1D, _Complex1D]: ...
@overload # worN: real
def sosfreqz(
def freqz_sos(
sos: onp.ToFloat2D,
worN: onp.ToComplex1D,
whole: op.CanBool = False,
fs: onp.ToFloat = ..., # 2 * pi
) -> tuple[_Inexact1D, _Complex1D]: ...

sosfreqz = freqz_sos

# TODO(jorenham): https://github.com/jorenham/scipy-stubs/issues/99

def tf2zpk(b: Untyped, a: Untyped) -> Untyped: ...
Expand Down
Loading
Loading