Skip to content
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
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ scipy = ["scipy"]

[tool.poetry.dependencies]
python = "^3.10"
optype = ">=0.7.1"
optype = ">=0.7.2"
scipy = {version = ">=1.10", optional = true}

[tool.poetry.group.dev.dependencies]
scipy = "1.14.1"
poethepoet = ">=0.30"
poethepoet = "^0.31.0"
pre-commit = "^4.0.1"
tox = "^4.23.2"

Expand Down
14 changes: 7 additions & 7 deletions scipy-stubs/fft/_helper.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from typing import Any, Literal, TypeVar, overload
import numpy as np
import optype as op
import optype.numpy as onp
from numpy._typing import _ArrayLike, _NestedSequence
from numpy._typing import _ArrayLike
from scipy._typing import AnyShape

_SCT = TypeVar("_SCT", bound=np.inexact[Any])
Expand Down Expand Up @@ -41,21 +41,21 @@ def rfftfreq(n: int, d: float = 1.0, *, xp: ModuleType, device: object | None =
# TODO(jorenham): Array API support (for `x`)
# https://github.com/jorenham/scipy-stubs/issues/140
@overload
def fftshift(x: _ArrayLike[_SCT], axes: AnyShape | None = None) -> onp.ArrayND[_SCT]: ...
def fftshift(x: onp.ToIntND | onp.SequenceND[float], axes: AnyShape | None = None) -> onp.ArrayND[np.float64]: ...
@overload
def fftshift(x: onp.ToIntND | _NestedSequence[float], axes: AnyShape | None = None) -> onp.ArrayND[np.float64]: ...
def fftshift(x: onp.SequenceND[complex], axes: AnyShape | None = None) -> onp.ArrayND[np.complex128 | np.float64]: ...
@overload
def fftshift(x: _NestedSequence[complex], axes: AnyShape | None = None) -> onp.ArrayND[np.complex128 | np.float64]: ...
def fftshift(x: _ArrayLike[_SCT], axes: AnyShape | None = None) -> onp.ArrayND[_SCT]: ...
@overload
def fftshift(x: onp.ToComplexND, axes: AnyShape | None = None) -> onp.ArrayND[np.inexact[Any]]: ...

# TODO(jorenham): Array API support (for `x`)
# https://github.com/jorenham/scipy-stubs/issues/140
@overload
def ifftshift(x: _ArrayLike[_SCT], axes: AnyShape | None = None) -> onp.ArrayND[_SCT]: ...
def ifftshift(x: onp.ToIntND | onp.SequenceND[float], axes: AnyShape | None = None) -> onp.ArrayND[np.float64]: ...
@overload
def ifftshift(x: onp.ToIntND | _NestedSequence[float], axes: AnyShape | None = None) -> onp.ArrayND[np.float64]: ...
def ifftshift(x: onp.SequenceND[complex], axes: AnyShape | None = None) -> onp.ArrayND[np.complex128 | np.float64]: ...
@overload
def ifftshift(x: _NestedSequence[complex], axes: AnyShape | None = None) -> onp.ArrayND[np.complex128 | np.float64]: ...
def ifftshift(x: _ArrayLike[_SCT], axes: AnyShape | None = None) -> onp.ArrayND[_SCT]: ...
@overload
def ifftshift(x: onp.ToComplexND, axes: AnyShape | None = None) -> onp.ArrayND[np.inexact[Any]]: ...
8 changes: 3 additions & 5 deletions scipy-stubs/signal/_bsplines.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ __all__ = ["cspline1d", "cspline1d_eval", "gauss_spline", "qspline1d", "qspline1
_SCT_fc = TypeVar("_SCT_fc", bound=np.inexact[Any])

@overload
def gauss_spline(x: _ArrayLike[_SCT_fc], n: onp.ToInt) -> onp.ArrayND[_SCT_fc]: ...
@overload
def gauss_spline(x: onp.ToIntND, n: onp.ToInt) -> onp.ArrayND[np.float64]: ...
def gauss_spline(x: onp.ToIntND | onp.SequenceND[float], n: onp.ToInt) -> onp.ArrayND[np.float64]: ...
@overload
def gauss_spline(x: onp.ToFloatND, n: onp.ToInt) -> onp.ArrayND[np.floating[Any]]: ...
def gauss_spline(x: onp.SequenceND[complex], n: onp.ToInt) -> onp.ArrayND[np.complex128 | np.float64]: ...
@overload
def gauss_spline(x: onp.ToComplexND, n: onp.ToInt) -> onp.ArrayND[np.inexact[Any]]: ...
def gauss_spline(x: _ArrayLike[_SCT_fc], n: onp.ToInt) -> onp.ArrayND[_SCT_fc]: ...

#
def spline_filter(Iin: _ArrayLike[_SCT_fc], lmbda: onp.ToFloat = 5.0) -> onp.ArrayND[_SCT_fc]: ...
Expand Down
Loading