Skip to content

Commit 993641d

Browse files
authored
Merge pull request #256 from numpy/polynomial.polynomial
🏷️ fix stubtest errors in `numpy.polynomial.polynomial`
2 parents b94c0be + eba01b4 commit 993641d

File tree

4 files changed

+873
-150
lines changed

4 files changed

+873
-150
lines changed

src/numpy-stubs/polynomial/chebyshev.pyi

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ def chebfromroots(roots: ToObject_1d) -> Array_1d[np.object_]: ...
186186

187187
#
188188
@overload
189+
def chebadd(c1: CoInteger_1d, c2: CoInteger_1d) -> Array_1d[np.float64]: ...
190+
@overload
189191
def chebadd(c1: ToFloat64_1d, c2: CoFloat64_1d) -> Array_1d[np.float64]: ...
190192
@overload
191193
def chebadd(c1: CoFloat64_1d, c2: ToFloat64_1d) -> Array_1d[np.float64]: ...
@@ -208,6 +210,8 @@ def chebadd(c1: _ToNumeric_1d, c2: ToObject_1d) -> Array_1d[np.object_]: ...
208210

209211
#
210212
@overload
213+
def chebsub(c1: CoInteger_1d, c2: CoInteger_1d) -> Array_1d[np.float64]: ...
214+
@overload
211215
def chebsub(c1: ToFloat64_1d, c2: CoFloat64_1d) -> Array_1d[np.float64]: ...
212216
@overload
213217
def chebsub(c1: CoFloat64_1d, c2: ToFloat64_1d) -> Array_1d[np.float64]: ...
@@ -244,6 +248,8 @@ def chebmulx(c: ToObject_1d) -> Array_1d[np.object_]: ...
244248

245249
#
246250
@overload
251+
def chebmul(c1: CoInteger_1d, c2: CoInteger_1d) -> Array_1d[np.float64]: ...
252+
@overload
247253
def chebmul(c1: ToFloat64_1d, c2: CoFloat64_1d) -> Array_1d[np.float64]: ...
248254
@overload
249255
def chebmul(c1: CoFloat64_1d, c2: ToFloat64_1d) -> Array_1d[np.float64]: ...
@@ -266,6 +272,8 @@ def chebmul(c1: _ToNumeric_1d, c2: ToObject_1d) -> Array_1d[np.object_]: ...
266272

267273
#
268274
@overload
275+
def chebdiv(c1: CoInteger_1d, c2: CoInteger_1d) -> Array_1d[np.float64]: ...
276+
@overload
269277
def chebdiv(c1: ToFloat64_1d, c2: CoFloat64_1d) -> Array_1d[np.float64]: ...
270278
@overload
271279
def chebdiv(c1: CoFloat64_1d, c2: ToFloat64_1d) -> Array_1d[np.float64]: ...
@@ -373,6 +381,8 @@ def chebint(
373381

374382
#
375383
@overload
384+
def chebval(x: CoInteger_0d, c: CoInteger_1d, tensor: bool = True) -> np.float64: ...
385+
@overload
376386
def chebval(x: ToFloat64_0d, c: CoFloat64_1d, tensor: bool = True) -> np.float64: ...
377387
@overload
378388
def chebval(x: CoFloat64_0d, c: ToFloat64_1d, tensor: bool = True) -> np.float64: ...
@@ -399,6 +409,8 @@ def chebval(x: _ToNumeric_nd, c: ToObject_1nd, tensor: bool = True) -> Array[np.
399409

400410
#
401411
@overload
412+
def chebval2d(x: CoInteger_0d, y: CoInteger_0d, c: CoInteger_1d) -> np.float64: ...
413+
@overload
402414
def chebval2d(x: ToFloat64_0d, y: CoFloat64_0d, c: CoFloat64_1d) -> np.float64: ...
403415
@overload
404416
def chebval2d(x: CoFloat64_0d, y: ToFloat64_0d, c: CoFloat64_1d) -> np.float64: ...
@@ -587,6 +599,8 @@ def chebvander(x: _ToNumeric_nd, deg: CanIndex) -> Array[Any]: ...
587599

588600
#
589601
@overload
602+
def chebvander2d(x: CoInteger_nd, y: CoInteger_nd, deg: _Indices) -> Array[np.float64]: ...
603+
@overload
590604
def chebvander2d(x: ToFloat64_nd, y: CoFloat64_nd, deg: _Indices) -> Array[np.float64]: ...
591605
@overload
592606
def chebvander2d(x: CoFloat64_nd, y: ToFloat64_nd, deg: _Indices) -> Array[np.float64]: ...
@@ -605,6 +619,8 @@ def chebvander2d(x: _ToNumeric_nd, y: _ToNumeric_nd, deg: _Indices) -> Array[Any
605619

606620
#
607621
@overload
622+
def chebvander3d(x: CoInteger_nd, y: CoInteger_nd, z: CoInteger_nd, deg: _Indices) -> Array[np.float64]: ...
623+
@overload
608624
def chebvander3d(x: ToFloat64_nd, y: CoFloat64_nd, z: CoFloat64_nd, deg: _Indices) -> Array[np.float64]: ...
609625
@overload
610626
def chebvander3d(x: CoFloat64_nd, y: ToFloat64_nd, z: CoFloat64_nd, deg: _Indices) -> Array[np.float64]: ...
@@ -629,6 +645,34 @@ def chebvander3d(x: _ToNumeric_nd, y: _ToNumeric_nd, z: _ToNumeric_nd, deg: _Ind
629645

630646
#
631647
@overload
648+
def chebfit(
649+
x: ToFloat64_1d | CoInteger_1d,
650+
y: ToFloat64_nd | CoInteger_nd,
651+
deg: int | CoInteger_1d,
652+
rcond: float | None = None,
653+
full: L[False] = False,
654+
w: ToFloating_1d | None = None,
655+
) -> Array[np.float64]: ...
656+
@overload
657+
def chebfit(
658+
x: ToFloat64_1d | CoInteger_1d,
659+
y: ToFloat64_nd | CoInteger_nd,
660+
deg: int | CoInteger_1d,
661+
rcond: float | None,
662+
full: L[True],
663+
w: ToFloating_1d | None = None,
664+
) -> _ArrayAndFitResult[np.float64]: ...
665+
@overload
666+
def chebfit(
667+
x: ToFloat64_1d | CoInteger_1d,
668+
y: ToFloat64_nd | CoInteger_nd,
669+
deg: int | CoInteger_1d,
670+
rcond: float | None = None,
671+
*,
672+
full: L[True],
673+
w: ToFloating_1d | None = None,
674+
) -> _ArrayAndFitResult[np.float64]: ...
675+
@overload
632676
def chebfit(
633677
x: ToFloating_1d,
634678
y: CoFloating_nd,

0 commit comments

Comments
 (0)