Skip to content

Commit 59ebbc8

Browse files
authored
🤡 work around false positive reportOverlappingOverload pyright errors on numpy<2.1 (#783)
2 parents fcc8606 + 8d72329 commit 59ebbc8

File tree

11 files changed

+125
-84
lines changed

11 files changed

+125
-84
lines changed

‎.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
with:
4040
activate-environment: true
4141
python-version: "3.13"
42+
version: "0.8.3"
4243

4344
- name: ruff
4445
run: |
@@ -60,10 +61,10 @@ jobs:
6061
steps:
6162
- uses: actions/[email protected]
6263

63-
- name: Install uv
64-
uses: astral-sh/[email protected]
64+
- uses: astral-sh/[email protected]
6565
with:
6666
python-version: "3.13"
67+
version: "0.8.3"
6768

6869
- name: Generate Matrix
6970
id: set-matrix
@@ -84,10 +85,10 @@ jobs:
8485
steps:
8586
- uses: actions/[email protected]
8687

87-
- name: setup uv
88-
uses: astral-sh/[email protected]
88+
- uses: astral-sh/[email protected]
8989
with:
9090
python-version: ${{ matrix.python }}
91+
version: "0.8.3"
9192

9293
- name: basedpyright
9394
run: >

‎scipy-stubs/fft/_basic.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ _Unused: TypeAlias = Never # not used by scipy
1515

1616
_CoInteger: TypeAlias = npc.integer | np.bool_
1717

18-
_AsFloat32: TypeAlias = onp.CanArrayND[npc.floating32, _ShapeT]
19-
_AsFloat64: TypeAlias = onp.CanArrayND[npc.floating64 | _CoInteger, _ShapeT]
20-
_AsFloat80: TypeAlias = onp.CanArrayND[npc.floating80, _ShapeT]
18+
_AsFloat32: TypeAlias = onp.CanArray[_ShapeT, np.dtype[npc.floating32]]
19+
_AsFloat64: TypeAlias = onp.CanArray[_ShapeT, np.dtype[npc.floating64 | _CoInteger]]
20+
_AsFloat80: TypeAlias = onp.CanArray[_ShapeT, np.dtype[npc.floating80]]
2121

22-
_AsComplex64: TypeAlias = onp.CanArrayND[npc.inexact32, _ShapeT]
23-
_AsComplex128: TypeAlias = onp.CanArrayND[npc.inexact64 | _CoInteger, _ShapeT]
24-
_AsComplex160: TypeAlias = onp.CanArrayND[npc.inexact80, _ShapeT]
22+
_AsComplex64: TypeAlias = onp.CanArray[_ShapeT, np.dtype[npc.inexact32]]
23+
_AsComplex128: TypeAlias = onp.CanArray[_ShapeT, np.dtype[npc.inexact64 | _CoInteger]]
24+
_AsComplex160: TypeAlias = onp.CanArray[_ShapeT, np.dtype[npc.inexact80]]
2525

2626
_ToFloat64_ND: TypeAlias = onp.ToArrayND[float, npc.floating64 | _CoInteger]
2727
_ToComplex128_ND: TypeAlias = onp.ToArrayND[complex, npc.inexact64 | _CoInteger]
2828

29-
# NOTE: The order of overloads is carefully chosen to avoid a pyright bug.
29+
# NOTE: The order of overloads has been carefully chosen to avoid triggering a pyright bug.
3030

3131
###
3232
# 1-D

‎scipy-stubs/fft/_fftlog.pyi

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from collections.abc import Sequence
2-
from typing import TypeVar, overload
2+
from typing import Any, TypeAlias, TypeVar, overload
33

44
import numpy as np
55
import optype.numpy as onp
@@ -10,11 +10,14 @@ __all__ = ["fht", "fhtoffset", "ifht"]
1010
_FloatT = TypeVar("_FloatT", bound=np.float32 | np.float64 | npc.floating80)
1111
_ShapeT = TypeVar("_ShapeT", bound=tuple[int, ...])
1212

13+
# workaround for a strange bug in pyright's overlapping overload detection with `numpy<2.1`
14+
_WorkaroundForPyright: TypeAlias = tuple[int] | tuple[Any, ...]
15+
1316
###
1417

1518
@overload
1619
def fht(
17-
a: onp.CanArrayND[_FloatT, _ShapeT], dln: onp.ToFloat, mu: onp.ToFloat, offset: onp.ToFloat = 0.0, bias: onp.ToFloat = 0.0
20+
a: onp.ArrayND[_FloatT, _ShapeT], dln: onp.ToFloat, mu: onp.ToFloat, offset: onp.ToFloat = 0.0, bias: onp.ToFloat = 0.0
1821
) -> onp.ArrayND[_FloatT, _ShapeT]: ...
1922
@overload
2023
def fht(
@@ -31,12 +34,12 @@ def fht(
3134
@overload
3235
def fht(
3336
a: onp.ToFloatND, dln: onp.ToFloat, mu: onp.ToFloat, offset: onp.ToFloat = 0.0, bias: onp.ToFloat = 0.0
34-
) -> onp.ArrayND[npc.floating]: ...
37+
) -> onp.ArrayND[npc.floating, _WorkaroundForPyright]: ...
3538

3639
#
3740
@overload
3841
def ifht(
39-
A: onp.CanArrayND[_FloatT, _ShapeT], dln: onp.ToFloat, mu: onp.ToFloat, offset: onp.ToFloat = 0.0, bias: onp.ToFloat = 0.0
42+
A: onp.ArrayND[_FloatT, _ShapeT], dln: onp.ToFloat, mu: onp.ToFloat, offset: onp.ToFloat = 0.0, bias: onp.ToFloat = 0.0
4043
) -> onp.ArrayND[_FloatT, _ShapeT]: ...
4144
@overload
4245
def ifht(
@@ -53,7 +56,7 @@ def ifht(
5356
@overload
5457
def ifht(
5558
A: onp.ToFloatND, dln: onp.ToFloat, mu: onp.ToFloat, offset: onp.ToFloat = 0.0, bias: onp.ToFloat = 0.0
56-
) -> onp.ArrayND[npc.floating]: ...
59+
) -> onp.ArrayND[npc.floating, _WorkaroundForPyright]: ...
5760

5861
#
5962
def fhtoffset(dln: onp.ToFloat, mu: onp.ToFloat, initial: onp.ToFloat = 0.0, bias: onp.ToFloat = 0.0) -> np.float64: ...

‎scipy-stubs/fft/_realtransforms.pyi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TypeAlias, TypeVar, overload
1+
from typing import Any, TypeAlias, TypeVar, overload
22

33
import numpy as np
44
import optype as op
@@ -13,8 +13,11 @@ __all__ = ["dct", "dctn", "dst", "dstn", "idct", "idctn", "idst", "idstn"]
1313
_DTypeT = TypeVar("_DTypeT", bound=np.dtype[np.float32 | np.float64 | npc.floating80 | npc.complexfloating])
1414
_ShapeT = TypeVar("_ShapeT", bound=tuple[int, ...])
1515

16+
# workaround for a strange bug in pyright's overlapping overload detection with `numpy<2.1`
17+
_WorkaroundForPyright: TypeAlias = tuple[int] | tuple[Any, ...]
18+
1619
_ToIntOrND: TypeAlias = onp.ToInt | onp.ToIntND
17-
_FloatND: TypeAlias = onp.ArrayND[np.float32 | np.float64 | np.longdouble]
20+
_FloatND: TypeAlias = onp.ArrayND[np.float32 | np.float64 | np.longdouble, _WorkaroundForPyright]
1821

1922
###
2023
# NOTE: These have (almost) identical signatures, so be sure to keep them in sync.

‎scipy-stubs/fft/_realtransforms_backend.pyi

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TypeVar, overload
1+
from typing import Any, TypeAlias, TypeVar, overload
22

33
import numpy as np
44
import optype as op
@@ -14,6 +14,9 @@ __all__ = ["dct", "dctn", "dst", "dstn", "idct", "idctn", "idst", "idstn"]
1414
_ShapeT = TypeVar("_ShapeT", bound=tuple[int, ...])
1515
_DTypeT = TypeVar("_DTypeT", bound=np.dtype[np.float32 | np.float64 | npc.floating80 | npc.complexfloating])
1616

17+
# workaround for a strange bug in pyright's overlapping overload detection with `numpy<2.1`
18+
_WorkaroundForPyright: TypeAlias = tuple[int] | tuple[Any, ...]
19+
1720
# NOTE: Unlike the ones in `scipy.fft._realtransforms`, `orthogonalize` is keyword-only here.
1821

1922
#
@@ -42,6 +45,18 @@ def idctn(
4245
orthogonalize: op.CanBool | None = None,
4346
) -> onp.Array[_ShapeT, np.float32]: ...
4447
@overload
48+
def idctn(
49+
x: onp.CanArray[_ShapeT, _DTypeT],
50+
type: DCTType = 2,
51+
s: onp.ToInt | onp.ToIntND | None = None,
52+
axes: AnyShape | None = None,
53+
norm: NormalizationMode | None = None,
54+
overwrite_x: op.CanBool = False,
55+
workers: onp.ToInt | None = None,
56+
*,
57+
orthogonalize: op.CanBool | None = None,
58+
) -> np.ndarray[_ShapeT, _DTypeT]: ...
59+
@overload
4560
def idctn(
4661
x: onp.ToJustFloat64_ND,
4762
type: DCTType = 2,
@@ -64,7 +79,7 @@ def idctn(
6479
workers: onp.ToInt | None = None,
6580
*,
6681
orthogonalize: op.CanBool | None = None,
67-
) -> onp.ArrayND[npc.floating]: ...
82+
) -> onp.Array[_WorkaroundForPyright, npc.floating]: ...
6883

6984
#
7085
@overload
@@ -126,4 +141,4 @@ def idstn(
126141
workers: onp.ToInt | None = None,
127142
*,
128143
orthogonalize: op.CanBool | None = None,
129-
) -> onp.ArrayND[npc.floating]: ...
144+
) -> onp.Array[_WorkaroundForPyright, npc.floating]: ...

‎scipy-stubs/linalg/_misc.pyi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ _SubScalar: TypeAlias = npc.inexact64 | npc.integer | np.bool_
1515

1616
_ShapeT = TypeVar("_ShapeT", bound=tuple[int, ...])
1717

18+
# workaround for a strange bug in pyright's overlapping overload detection with `numpy<2.1`
19+
_WorkaroundForPyright: TypeAlias = tuple[int] | tuple[Any, ...]
20+
1821
###
1922

2023
class LinAlgWarning(RuntimeWarning): ...
@@ -158,7 +161,7 @@ def norm(
158161
@overload # array-like, keepdims: True (positional)
159162
def norm(
160163
a: onp.ToComplexND, ord: _Order | None, axis: _Axis | None, keepdims: onp.ToTrue, check_finite: onp.ToBool = True
161-
) -> onp.ArrayND[npc.floating]: ...
164+
) -> onp.ArrayND[npc.floating, _WorkaroundForPyright]: ...
162165
@overload # array-like, keepdims: True (keyword)
163166
def norm(
164167
a: onp.ToComplexND,
@@ -167,15 +170,15 @@ def norm(
167170
*,
168171
keepdims: onp.ToTrue,
169172
check_finite: onp.ToBool = True,
170-
) -> onp.ArrayND[npc.floating]: ...
173+
) -> onp.ArrayND[npc.floating, _WorkaroundForPyright]: ...
171174
@overload # catch-all
172175
def norm(
173176
a: onp.ToArrayND,
174177
ord: _Order | None = None,
175178
axis: _Axis | None = None,
176179
keepdims: onp.ToBool = False,
177180
check_finite: onp.ToBool = True,
178-
) -> npc.floating | onp.ArrayND[npc.floating]: ...
181+
) -> npc.floating | onp.ArrayND[npc.floating, _WorkaroundForPyright]: ...
179182

180183
#
181184
def _datacopied(arr: onp.ArrayND[Any], original: onp.CanArrayND[Any]) -> bool: ... # undocumented

‎scipy-stubs/signal/_signaltools.pyi

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ _C64_128: TypeAlias = np.complex128 | np.complex64
8181
_WindowFuncFloat: TypeAlias = Callable[[onp.Array1D[np.float64]], onp.ToFloat1D]
8282
_WindowFuncComplex: TypeAlias = Callable[[onp.Array1D[np.complex128]], onp.ToFloat1D]
8383

84+
# workaround for a strange bug in pyright's overlapping overload detection with `numpy<2.1`
85+
_WorkaroundForPyright: TypeAlias = tuple[int] | tuple[Any, ...]
86+
8487
@type_check_only
8588
class _ConvMeasureDict(TypedDict):
8689
direct: float
@@ -112,8 +115,8 @@ def convolve(
112115
) -> onp.ArrayND[np.bool_]: ...
113116
@overload # generic
114117
def convolve(
115-
in1: onp.CanArrayND[_NumericT, _AnyShapeT],
116-
in2: onp.CanArrayND[_NumericT, _AnyShapeT],
118+
in1: onp.CanArray[_AnyShapeT, np.dtype[_NumericT]],
119+
in2: onp.CanArray[_AnyShapeT, np.dtype[_NumericT]],
117120
mode: onp.ConvolveMode = "full",
118121
method: _ToConvMethod = "auto",
119122
) -> onp.ArrayND[_NumericT, _AnyShapeT]: ...
@@ -153,8 +156,8 @@ def correlate(
153156
) -> onp.ArrayND[np.bool_]: ...
154157
@overload # generic
155158
def correlate(
156-
in1: onp.CanArrayND[_NumericT, _AnyShapeT],
157-
in2: onp.CanArrayND[_NumericT, _AnyShapeT],
159+
in1: onp.CanArray[_AnyShapeT, np.dtype[_NumericT]],
160+
in2: onp.CanArray[_AnyShapeT, np.dtype[_NumericT]],
158161
mode: onp.ConvolveMode = "full",
159162
method: _ToConvMethod = "auto",
160163
) -> onp.ArrayND[_NumericT, _AnyShapeT]: ...
@@ -353,7 +356,7 @@ def fftconvolve(
353356
@overload # fallback
354357
def fftconvolve(
355358
in1: onp.ToComplexND, in2: onp.ToComplexND, mode: onp.ConvolveMode = "full", axes: AnyShape | None = None
356-
) -> onp.ArrayND[Any]: ...
359+
) -> onp.ArrayND[Any, _WorkaroundForPyright]: ...
357360

358361
# NOTE: keep in sync with `fftconvolve`
359362
@overload # float32 | float16, float32 | float16, generic shape
@@ -389,15 +392,15 @@ def oaconvolve(
389392
@overload # fallback
390393
def oaconvolve(
391394
in1: onp.ToComplexND, in2: onp.ToComplexND, mode: onp.ConvolveMode = "full", axes: AnyShape | None = None
392-
) -> onp.ArrayND[Any]: ...
395+
) -> onp.ArrayND[Any, _WorkaroundForPyright]: ...
393396

394397
#
395398
@overload # +float64, +float64
396399
def deconvolve(signal: onp.ToFloat64_1D, divisor: onp.ToFloat64_1D) -> _Tuple2[onp.Array1D[np.float64]]: ...
397400
@overload # ~longdouble, +floating
398-
def deconvolve(signal: onp.ToJustLongDouble1D, divisor: onp.ToFloat1D) -> _Tuple2[onp.Array1D[np.longdouble]]: ...
401+
def deconvolve(signal: onp.ToJustLongDouble1D, divisor: onp.ToFloat1D) -> _Tuple2[onp.Array1D[npc.floating80]]: ...
399402
@overload # +floating, ~longdouble
400-
def deconvolve(signal: onp.ToFloat1D, divisor: onp.ToJustLongDouble1D) -> _Tuple2[onp.Array1D[np.longdouble]]: ...
403+
def deconvolve(signal: onp.ToFloat1D, divisor: onp.ToJustLongDouble1D) -> _Tuple2[onp.Array1D[npc.floating80]]: ...
401404
@overload # ~complex128 | ~complex64, +complex128
402405
def deconvolve(
403406
signal: onp.ToArray1D[op.JustComplex, _C64_128], divisor: onp.ToComplex128_1D
@@ -891,7 +894,7 @@ def order_filter(a: onp.ToJustInt64_ND, domain: int | onp.ToIntND, rank: int) ->
891894
def order_filter(a: onp.ToJustFloat64_ND, domain: int | onp.ToIntND, rank: int) -> onp.ArrayND[np.float64]: ...
892895
@overload
893896
def order_filter(
894-
a: onp.CanArrayND[_CoFloat64T, _ShapeT], domain: int | onp.ToIntND, rank: int
897+
a: onp.CanArray[_ShapeT, np.dtype[_CoFloat64T]], domain: int | onp.ToIntND, rank: int
895898
) -> onp.ArrayND[_CoFloat64T, _ShapeT]: ...
896899
@overload
897900
def order_filter(a: onp.ToFloatND, domain: int | onp.ToIntND, rank: int) -> onp.ArrayND[Any]: ...
@@ -903,7 +906,7 @@ def medfilt(volume: onp.ToJustInt64_ND, kernel_size: int | onp.ToInt1D | None =
903906
def medfilt(volume: onp.ToJustFloat64_ND, kernel_size: int | onp.ToInt1D | None = None) -> onp.ArrayND[np.float64]: ...
904907
@overload
905908
def medfilt(
906-
volume: onp.CanArrayND[_CoFloat64T, _ShapeT], kernel_size: int | onp.ToInt1D | None = None
909+
volume: onp.CanArray[_ShapeT, np.dtype[_CoFloat64T]], kernel_size: int | onp.ToInt1D | None = None
907910
) -> onp.ArrayND[_CoFloat64T, _ShapeT]: ...
908911
@overload
909912
def medfilt(volume: onp.ToFloatND, kernel_size: int | onp.ToInt1D | None = None) -> onp.ArrayND[Any]: ...
@@ -926,7 +929,7 @@ def wiener(
926929
@overload # ~longdouble
927930
def wiener(
928931
im: onp.ToJustLongDoubleND, mysize: int | onp.ToInt1D | None = None, noise: float | None = None
929-
) -> onp.ArrayND[np.longdouble]: ...
932+
) -> onp.ArrayND[npc.floating80]: ...
930933
@overload # ~complex128 | ~complex64
931934
def wiener(
932935
im: onp.ToArrayND[op.JustComplex, np.complex128 | np.complex64],
@@ -943,15 +946,15 @@ def wiener(im: onp.ToComplexND, mysize: int | onp.ToInt1D | None = None, noise:
943946
#
944947
@overload # float64 | integer, known shape
945948
def hilbert(
946-
x: onp.CanArrayND[np.float64 | npc.integer, _ShapeT], N: int | None = None, axis: int = -1
949+
x: onp.CanArray[_ShapeT, np.dtype[np.float64 | npc.integer]], N: int | None = None, axis: int = -1
947950
) -> onp.ArrayND[np.complex128, _ShapeT]: ...
948951
@overload # float32 | float16, known shape
949952
def hilbert(
950-
x: onp.CanArrayND[np.float32 | np.float16, _ShapeT], N: int | None = None, axis: int = -1
953+
x: onp.CanArray[_ShapeT, np.dtype[np.float32 | np.float16]], N: int | None = None, axis: int = -1
951954
) -> onp.ArrayND[np.complex64, _ShapeT]: ...
952955
@overload # longdouble, known shape
953956
def hilbert(
954-
x: onp.CanArrayND[npc.floating80, _ShapeT], N: int | None = None, axis: int = -1
957+
x: onp.CanArray[_ShapeT, np.dtype[npc.floating80]], N: int | None = None, axis: int = -1
955958
) -> onp.ArrayND[np.clongdouble, _ShapeT]: ...
956959
@overload # float64 | integer, unknown shape
957960
def hilbert(
@@ -1037,13 +1040,13 @@ def resample(
10371040
) -> onp.ArrayND[npc.floating]: ...
10381041
@overload
10391042
def resample(
1040-
x: onp.ToComplexND,
1043+
x: onp.ToJustComplexND,
10411044
num: int,
10421045
t: None = None,
10431046
axis: int = 0,
10441047
window: _WindowFuncComplex | onp.ToFloat1D | _ToWindow | None = None,
10451048
domain: _Domain = "time",
1046-
) -> onp.ArrayND[npc.inexact]: ...
1049+
) -> onp.ArrayND[npc.complexfloating]: ...
10471050
@overload
10481051
def resample(
10491052
x: onp.ArrayND[_EnvelopeSCT, _AnyShapeT],
@@ -1064,13 +1067,13 @@ def resample(
10641067
) -> tuple[onp.ArrayND[npc.floating], onp.Array1D[npc.floating]]: ...
10651068
@overload
10661069
def resample(
1067-
x: onp.ToComplexND,
1070+
x: onp.ToJustComplexND,
10681071
num: int,
10691072
t: onp.ToFloat1D,
10701073
axis: int = 0,
10711074
window: _WindowFuncComplex | onp.ToFloat1D | _ToWindow | None = None,
10721075
domain: _Domain = "time",
1073-
) -> tuple[onp.ArrayND[npc.inexact], onp.Array1D[npc.floating]]: ...
1076+
) -> tuple[onp.ArrayND[npc.complexfloating], onp.Array1D[npc.floating]]: ...
10741077

10751078
# TODO(jorenham): improve
10761079
@overload

‎scipy-stubs/signal/_spline_filters.pyi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TypeAlias, overload
1+
from typing import Any, TypeAlias, overload
22
from typing_extensions import TypeVar
33

44
import numpy as np
@@ -34,6 +34,9 @@ _ShapeT = TypeVar("_ShapeT", bound=tuple[int, ...])
3434
#
3535
def spline_filter(Iin: onp.ArrayND[_FloatDT], lmbda: onp.ToFloat = 5.0) -> onp.Array2D[_FloatDT]: ...
3636

37+
# NOTE: Mypy reports a false positive `overload-overlap` error with `numpy<2.1`.
38+
# mypy: disable-error-code=overload-overlap
39+
3740
#
3841
@overload
3942
def gauss_spline(x: onp.ArrayND[_SubFloat64, _ShapeT], n: onp.ToFloat) -> onp.ArrayND[np.float64, _ShapeT]: ...
@@ -45,8 +48,8 @@ def gauss_spline(x: onp.ToFloatStrict1D, n: onp.ToFloat) -> onp.Array1D[_FloatQ]
4548
def gauss_spline(x: onp.ToFloatStrict2D, n: onp.ToFloat) -> onp.Array2D[_FloatQ]: ...
4649
@overload
4750
def gauss_spline(x: onp.ToFloatStrict3D, n: onp.ToFloat) -> onp.Array3D[_FloatQ]: ...
48-
@overload
49-
def gauss_spline(x: onp.ToFloatND, n: onp.ToFloat) -> onp.ArrayND[_FloatQ]: ...
51+
@overload # the weird shape-type is a workaround for a bug in pyright's overlapping overload detection
52+
def gauss_spline(x: onp.ToFloatND, n: onp.ToFloat) -> onp.ArrayND[_FloatQ, tuple[int] | tuple[Any, ...]]: ...
5053
@overload
5154
def gauss_spline(x: onp.ToJustComplexStrict1D, n: onp.ToFloat) -> onp.Array1D[_ComplexQ]: ...
5255
@overload

‎scipy-stubs/spatial/transform/_rigid_transform.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# https://github.com/scipy/scipy/blob/maintenance/1.16.x/scipy/spatial/transform/_rigid_transform.pyx
22

33
from collections.abc import Iterable
4-
from typing import Self, TypeAlias, overload
4+
from typing import Any, Self, TypeAlias, overload
55

66
import numpy as np
77
import optype as op
@@ -63,7 +63,7 @@ class RigidTransform:
6363
@overload
6464
def apply(
6565
self, /, vector: onp.ToFloat1D | onp.ToFloat2D, inverse: bool = False
66-
) -> onp.ArrayND[np.float64, tuple[int] | tuple[int, int]]: ...
66+
) -> onp.ArrayND[np.float64, tuple[int] | tuple[Any, ...]]: ...
6767

6868
#
6969
@property

0 commit comments

Comments
 (0)