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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ classifiers = [
"Typing :: Stubs Only",
]
requires-python = ">=3.11"
dependencies = ["optype>=0.10.0,<1"]
dependencies = ["optype>=0.11.0,<1"]

[project.optional-dependencies]
scipy = ["scipy>=1.16.0,<1.17"]
Expand Down
17 changes: 8 additions & 9 deletions scipy-stubs/sparse/_construct.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ class _DataSampler(Protocol):

###

# NOTE: The `overload-overlap` mypy errors are false positives.
@overload # diagonals: <known>, dtype: None = ..., format: {"dia", None} = ...
def diags_array( # type: ignore[overload-overlap]
def diags_array(
diagonals: _ToArray1D[_SCT] | _ToArray2D[_SCT],
/,
*,
Expand Down Expand Up @@ -739,7 +738,7 @@ def random_array(
*,
density: float | npc.floating = 0.01,
format: _FmtCOO = "coo",
dtype: onp.AnyFloat64DType = None,
dtype: onp.AnyFloat64DType | None = None,
rng: onp.random.ToRNG | None = None,
random_state: onp.random.ToRNG | None = None,
data_sampler: _DataSampler | None = None,
Expand Down Expand Up @@ -783,7 +782,7 @@ def random_array(
*,
density: float | npc.floating = 0.01,
format: _Format = "coo",
dtype: onp.AnyFloat64DType = None,
dtype: onp.AnyFloat64DType | None = None,
rng: onp.random.ToRNG | None = None,
random_state: onp.random.ToRNG | None = None,
data_sampler: _DataSampler | None = None,
Expand All @@ -794,7 +793,7 @@ def random_array(
*,
density: float | npc.floating = 0.01,
format: _Format = "coo",
dtype: onp.AnyFloat64DType = None,
dtype: onp.AnyFloat64DType | None = None,
rng: onp.random.ToRNG | None = None,
random_state: onp.random.ToRNG | None = None,
data_sampler: _DataSampler | None = None,
Expand Down Expand Up @@ -873,7 +872,7 @@ def random(
n: opt.AnyInt,
density: float | npc.floating = 0.01,
format: _FmtCOO = "coo",
dtype: onp.AnyFloat64DType = None,
dtype: onp.AnyFloat64DType | None = None,
rng: onp.random.ToRNG | None = None,
data_rvs: _DataRVS | None = None,
*,
Expand Down Expand Up @@ -945,7 +944,7 @@ def random(
n: opt.AnyInt,
density: float | npc.floating = 0.01,
format: _Format = ...,
dtype: onp.AnyFloat64DType = None,
dtype: onp.AnyFloat64DType | None = None,
rng: onp.random.ToRNG | None = None,
data_rvs: _DataRVS | None = None,
*,
Expand Down Expand Up @@ -1019,7 +1018,7 @@ def rand(
n: opt.AnyInt,
density: float | npc.floating = 0.01,
format: _FmtCOO = "coo",
dtype: onp.AnyFloat64DType = None,
dtype: onp.AnyFloat64DType | None = None,
rng: onp.random.ToRNG | None = None,
*,
random_state: onp.random.ToRNG | None = None,
Expand Down Expand Up @@ -1074,7 +1073,7 @@ def rand(
n: opt.AnyInt,
density: float | npc.floating = 0.01,
format: _Format = "coo",
dtype: onp.AnyFloat64DType = None,
dtype: onp.AnyFloat64DType | None = None,
rng: onp.random.ToRNG | None = None,
*,
random_state: onp.random.ToRNG | None = None,
Expand Down
2 changes: 1 addition & 1 deletion scipy-stubs/sparse/linalg/_interface.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class LinearOperator(Generic[_SCT_co]):

# keep in sync with `_CustomLinearOperator.__init__`
@overload # no dtype
def __new__( # type: ignore[overload-overlap]
def __new__(
cls,
shape: _ToShape,
matvec: _FunMatVec,
Expand Down
47 changes: 31 additions & 16 deletions scipy-stubs/special/_ufuncs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,12 @@ class _UFunc21f(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identity
#
@override
def accumulate(
self, /, array: onp.ToFloat64_ND, axis: op.CanIndex = 0, dtype: _ToDType_fd = None, out: _Out1[_FloatND | None] = None
self,
/,
array: onp.ToFloat64_ND,
axis: op.CanIndex = 0,
dtype: _ToDType_fd | None = None,
out: _Out1[_FloatND | None] = None,
) -> _FloatND: ...
#
@overload
Expand All @@ -1076,7 +1081,7 @@ class _UFunc21f(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identity
/,
array: onp.ToFloat64_ND,
axis: None,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1 = None,
keepdims: onp.ToFalse = False,
initial: onp.ToFloat64 = ...,
Expand All @@ -1088,7 +1093,7 @@ class _UFunc21f(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identity
/,
array: onp.ToFloat64_ND,
axis: _Axis = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1 = None,
keepdims: onp.ToFalse = False,
initial: onp.ToFloat64 = ...,
Expand All @@ -1100,7 +1105,7 @@ class _UFunc21f(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identity
/,
array: onp.ToFloat64_ND,
axis: _Axis = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1 = None,
*,
keepdims: onp.ToTrue,
Expand All @@ -1125,7 +1130,7 @@ class _UFunc21f(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identity
/,
array: onp.ToFloat64_ND,
axis: _Axis = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
*,
out: _Out1[_OutT],
keepdims: bool = False,
Expand All @@ -1140,7 +1145,7 @@ class _UFunc21f(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identity
array: onp.ToFloat64_ND,
indices: _Indices,
axis: op.CanIndex = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1[_FloatND | None] = None,
) -> _FloatND: ...
#
Expand Down Expand Up @@ -1223,7 +1228,12 @@ class _UFunc21fc1(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
#
@override
def accumulate(
self, /, array: onp.ToFloat64_ND, axis: op.CanIndex = 0, dtype: _ToDType_fd = None, out: _Out1[_FloatND | None] = None
self,
/,
array: onp.ToFloat64_ND,
axis: op.CanIndex = 0,
dtype: _ToDType_fd | None = None,
out: _Out1[_FloatND | None] = None,
) -> _FloatND: ...
#
@overload
Expand All @@ -1232,7 +1242,7 @@ class _UFunc21fc1(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
/,
array: onp.ToFloat64_ND,
axis: None,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1 = None,
keepdims: onp.ToFalse = False,
initial: onp.ToFloat64 = ...,
Expand All @@ -1244,7 +1254,7 @@ class _UFunc21fc1(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
/,
array: onp.ToFloat64_ND,
axis: _Axis = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1 = None,
keepdims: onp.ToFalse = False,
initial: onp.ToFloat64 = ...,
Expand All @@ -1256,7 +1266,7 @@ class _UFunc21fc1(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
/,
array: onp.ToFloat64_ND,
axis: _Axis = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1 = None,
*,
keepdims: onp.ToTrue,
Expand All @@ -1281,7 +1291,7 @@ class _UFunc21fc1(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
/,
array: onp.ToFloat64_ND,
axis: _Axis = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
*,
out: _Out1[_OutT],
keepdims: bool = False,
Expand All @@ -1296,7 +1306,7 @@ class _UFunc21fc1(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
array: onp.ToFloat64_ND,
indices: _Indices,
axis: op.CanIndex = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1[_FloatND | None] = None,
) -> _FloatND: ...
#
Expand Down Expand Up @@ -1351,7 +1361,12 @@ class _UFunc21fc2(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
#
@overload
def accumulate(
self, /, array: onp.ToFloat64_ND, axis: op.CanIndex = 0, dtype: _ToDType_fd = None, out: _Out1[_FloatND | None] = None
self,
/,
array: onp.ToFloat64_ND,
axis: op.CanIndex = 0,
dtype: _ToDType_fd | None = None,
out: _Out1[_FloatND | None] = None,
) -> _FloatND: ...
@overload
def accumulate(
Expand All @@ -1369,7 +1384,7 @@ class _UFunc21fc2(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
/,
array: onp.ToFloat64_ND,
axis: None,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1 = None,
keepdims: onp.ToFalse = False,
initial: onp.ToFloat = ...,
Expand All @@ -1381,7 +1396,7 @@ class _UFunc21fc2(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
/,
array: onp.ToFloat64_ND,
axis: _Axis = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1 = None,
*,
keepdims: onp.ToTrue,
Expand Down Expand Up @@ -1458,7 +1473,7 @@ class _UFunc21fc2(_UFunc21[_NameT_co, _IdentityT_co], Generic[_NameT_co, _Identi
array: onp.ToFloat64_ND,
indices: _Indices,
axis: op.CanIndex = 0,
dtype: _ToDType_fd = None,
dtype: _ToDType_fd | None = None,
out: _Out1[_FloatND | None] = None,
) -> _FloatND: ...
@overload
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

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