Skip to content

Commit 4a6bfd0

Browse files
committed
🎨 np.polynomial cleanup
1 parent 113fce2 commit 4a6bfd0

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

‎src/numpy-stubs/polynomial/_polybase.pyi

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import abc
22
from collections.abc import Iterator, Mapping, Sequence
3-
from typing import Any, ClassVar, Final, Literal, Self, SupportsIndex, TypeAlias, overload
3+
from typing import Any, ClassVar, Literal, Self, SupportsIndex, TypeAlias, overload
44
from typing_extensions import TypeIs, TypeVar, override
55

66
import _numtype as _nt
77
import numpy as np
8-
import numpy.typing as npt
9-
from numpy._typing import _FloatLike_co
108

119
from .polynomial import _ToNumeric_0d, _ToNumeric_nd
1210

13-
__all__: Final[Sequence[str]] = ("ABCPolyBase",)
11+
__all__ = ["ABCPolyBase"]
1412

1513
###
1614

@@ -65,11 +63,11 @@ class ABCPolyBase(abc.ABC):
6563
@overload
6664
def __call__(self, /, arg: _nt.CoComplex_0d) -> _nt.inexact64: ...
6765
@overload
68-
def __call__(self, /, arg: _nt.CoComplex_1nd) -> npt.NDArray[_nt.inexact64]: ...
66+
def __call__(self, /, arg: _nt.CoComplex_1nd) -> _nt.Array[_nt.inexact64]: ...
6967
@overload
7068
def __call__(self, /, arg: _nt.ToObject_0d) -> Any: ...
7169
@overload
72-
def __call__(self, /, arg: _nt.ToObject_1nd) -> npt.NDArray[np.object_]: ...
70+
def __call__(self, /, arg: _nt.ToObject_1nd) -> _nt.Array[np.object_]: ...
7371

7472
#
7573
@override
@@ -112,7 +110,7 @@ class ABCPolyBase(abc.ABC):
112110
def copy(self, /) -> Self: ...
113111
def degree(self, /) -> int: ...
114112
def cutdeg(self, /, deg: int) -> Self: ...
115-
def trim(self, /, tol: _FloatLike_co = 0) -> Self: ...
113+
def trim(self, /, tol: _nt.CoFloating_nd = 0) -> Self: ...
116114
def truncate(self, /, size: SupportsIndex) -> Self: ...
117115

118116
#
@@ -169,7 +167,7 @@ class ABCPolyBase(abc.ABC):
169167
y: _nt.CoComplex_1d,
170168
deg: _nt.CoInteger_0d | _nt.CoInteger_1d,
171169
domain: _nt.CoComplex_1d | None = None,
172-
rcond: _FloatLike_co | None = None,
170+
rcond: _nt.CoFloating_nd | None = None,
173171
full: Literal[False] = False,
174172
w: _nt.CoComplex_1d | None = None,
175173
window: _nt.CoComplex_1d | None = None,
@@ -183,7 +181,7 @@ class ABCPolyBase(abc.ABC):
183181
y: _nt.CoComplex_1d,
184182
deg: _nt.CoInteger_0d | _nt.CoInteger_1d,
185183
domain: _nt.CoComplex_1d | None,
186-
rcond: _FloatLike_co | None,
184+
rcond: _nt.CoFloating_nd | None,
187185
full: Literal[True],
188186
w: _nt.CoComplex_1d | None = None,
189187
window: _nt.CoComplex_1d | None = None,
@@ -197,7 +195,7 @@ class ABCPolyBase(abc.ABC):
197195
y: _nt.CoComplex_1d,
198196
deg: _nt.CoInteger_0d | _nt.CoInteger_1d,
199197
domain: _nt.CoComplex_1d | None = None,
200-
rcond: _FloatLike_co | None = None,
198+
rcond: _nt.CoFloating_nd | None = None,
201199
*,
202200
full: Literal[True],
203201
w: _nt.CoComplex_1d | None = None,

0 commit comments

Comments
 (0)