Skip to content

Commit e58628f

Browse files
authored
⬆️ upgrade optype to 0.13.1 (#777)
2 parents 05684da + b911530 commit e58628f

File tree

10 files changed

+205
-194
lines changed

10 files changed

+205
-194
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ classifiers = [
3030
"Typing :: Stubs Only",
3131
]
3232
requires-python = ">=3.11"
33-
dependencies = ["optype>=0.12.2"]
33+
dependencies = ["optype[numpy]>=0.13.1,<0.14"]
3434

3535
[project.optional-dependencies]
3636
scipy = ["scipy>=1.16.0,<1.17"]

scipy-stubs/cluster/vq.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _AsFloat64_2D: TypeAlias = onp.ToArray2D[float, npc.floating64 | npc.integer]
1919
_PyFloatMax2D: TypeAlias = Sequence[float] | Sequence[Sequence[float]]
2020

2121
###
22-
# NOTE: DO NOT RE-ORDER THE OVERLOADS WITH a `# type: ignore`, otherwise it'll trigger a pernicious bug in pyright (1.1.403).
22+
# NOTE: DO NOT RE-ORDER THE OVERLOADS, otherwise it'll trigger a pernicious bug in pyright (1.1.403).
2323

2424
class ClusterError(Exception): ...
2525

@@ -31,7 +31,7 @@ def whiten(obs: onp.ArrayND[_InexactT], check_finite: bool | None = None) -> onp
3131

3232
#
3333
@overload # float32
34-
def vq( # type: ignore[overload-overlap]
34+
def vq(
3535
obs: onp.CanArrayND[np.float32], code_book: _ToFloat32_2D, check_finite: bool = True
3636
) -> tuple[onp.Array1D[np.int32], onp.Array1D[np.float32]]: ...
3737
@overload # float64
@@ -55,7 +55,7 @@ def py_vq(
5555

5656
#
5757
@overload # float32
58-
def kmeans( # type: ignore[overload-overlap]
58+
def kmeans(
5959
obs: onp.CanArrayND[np.float32],
6060
k_or_guess: int | _ToFloat32_2D,
6161
iter: int = 20,

scipy-stubs/ndimage/_fourier.pyi

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def _get_output_fourier(output: _OutputArrayT, input: onp.ToComplex128_ND) -> _O
3333
@overload # output: <T: scalar type>
3434
def _get_output_fourier(output: type[_OutputScalarT], input: onp.ToComplex128_ND) -> onp.ArrayND[_OutputScalarT]: ...
3535
@overload # +float32
36-
def _get_output_fourier(output: None, input: _InputF32) -> onp.ArrayND[np.float32]: ... # type: ignore[overload-overlap]
36+
def _get_output_fourier(output: None, input: _InputF32) -> onp.ArrayND[np.float32]: ...
3737
@overload # +float64
3838
def _get_output_fourier(output: None, input: _InputF64) -> onp.ArrayND[np.float64]: ...
3939
@overload # ~complex64
40-
def _get_output_fourier(output: None, input: _InputC64) -> onp.ArrayND[np.complex64]: ... # type: ignore[overload-overlap]
40+
def _get_output_fourier(output: None, input: _InputC64) -> onp.ArrayND[np.complex64]: ...
4141
@overload # ~complex128
4242
def _get_output_fourier(output: None, input: _InputC128) -> onp.ArrayND[np.complex128]: ...
4343
@overload # fallback
@@ -53,7 +53,7 @@ def _get_output_fourier_complex(
5353
output: onp.ArrayND[np.complex128] | type[np.complex128], input: onp.ToComplex128_ND
5454
) -> onp.ArrayND[np.complex128]: ...
5555
@overload # ~complex64
56-
def _get_output_fourier_complex(output: None, input: _InputC64) -> onp.ArrayND[np.complex64]: ... # type: ignore[overload-overlap]
56+
def _get_output_fourier_complex(output: None, input: _InputC64) -> onp.ArrayND[np.complex64]: ...
5757
@overload # ~complex128 | +floating
5858
def _get_output_fourier_complex(output: None, input: _InputC128 | onp.ToFloat64_ND) -> onp.ArrayND[np.complex128]: ...
5959
@overload # fallback
@@ -77,15 +77,15 @@ def fourier_gaussian(
7777
input: onp.ToComplex128_ND, sigma: _Sigma, n: CanIndex = -1, axis: int = -1, *, output: type[_OutputScalarT]
7878
) -> onp.ArrayND[_OutputScalarT]: ...
7979
@overload # +float32
80-
def fourier_gaussian( # type: ignore[overload-overlap]
80+
def fourier_gaussian(
8181
input: _InputF32, sigma: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
8282
) -> onp.ArrayND[np.float32]: ...
8383
@overload # +float64
8484
def fourier_gaussian(
8585
input: _InputF64, sigma: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
8686
) -> onp.ArrayND[np.float64]: ...
8787
@overload # ~complex64
88-
def fourier_gaussian( # type: ignore[overload-overlap]
88+
def fourier_gaussian(
8989
input: _InputC64, sigma: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
9090
) -> onp.ArrayND[np.complex64]: ...
9191
@overload # ~complex128
@@ -113,15 +113,15 @@ def fourier_uniform(
113113
input: onp.ToComplex128_ND, size: _Sigma, n: CanIndex = -1, axis: int = -1, *, output: type[_OutputScalarT]
114114
) -> onp.ArrayND[_OutputScalarT]: ...
115115
@overload # +float32
116-
def fourier_uniform( # type: ignore[overload-overlap]
116+
def fourier_uniform(
117117
input: _InputF32, size: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
118118
) -> onp.ArrayND[np.float32]: ...
119119
@overload # +float64
120120
def fourier_uniform(
121121
input: _InputF64, size: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
122122
) -> onp.ArrayND[np.float64]: ...
123123
@overload # ~complex64
124-
def fourier_uniform( # type: ignore[overload-overlap]
124+
def fourier_uniform(
125125
input: _InputC64, size: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
126126
) -> onp.ArrayND[np.complex64]: ...
127127
@overload # ~complex128
@@ -151,15 +151,15 @@ def fourier_ellipsoid(
151151
input: onp.ToComplex128_ND, size: _Sigma, n: CanIndex = -1, axis: int = -1, *, output: type[_OutputScalarT]
152152
) -> onp.ArrayND[_OutputScalarT]: ...
153153
@overload # +float32
154-
def fourier_ellipsoid( # type: ignore[overload-overlap]
154+
def fourier_ellipsoid(
155155
input: _InputF32, size: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
156156
) -> onp.ArrayND[np.float32]: ...
157157
@overload # +float64
158158
def fourier_ellipsoid(
159159
input: _InputF64, size: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
160160
) -> onp.ArrayND[np.float64]: ...
161161
@overload # ~complex64
162-
def fourier_ellipsoid( # type: ignore[overload-overlap]
162+
def fourier_ellipsoid(
163163
input: _InputC64, size: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
164164
) -> onp.ArrayND[np.complex64]: ...
165165
@overload # ~complex128
@@ -189,7 +189,7 @@ def fourier_shift(
189189
input: onp.ToComplex128_ND, shift: _Sigma, n: CanIndex = -1, axis: int = -1, *, output: type[_OutputScalarComplexT]
190190
) -> onp.ArrayND[_OutputScalarComplexT]: ...
191191
@overload # ~complex64
192-
def fourier_shift( # type: ignore[overload-overlap]
192+
def fourier_shift(
193193
input: _InputC64, shift: _Sigma, n: CanIndex = -1, axis: int = -1, output: None = None
194194
) -> onp.ArrayND[np.complex64]: ...
195195
@overload # ~complex128 | +floating

0 commit comments

Comments
 (0)