Skip to content

Commit fce6aef

Browse files
committed
🏷️ fix stubtest errors in numpy.polynomial.hermite
1 parent a73e1db commit fce6aef

File tree

2 files changed

+33
-78
lines changed

2 files changed

+33
-78
lines changed

src/numpy-stubs/polynomial/hermite.pyi

Lines changed: 33 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,34 @@ import numpy as np
55
from _numtype import Array, Array_1d
66

77
from ._polybase import ABCPolyBase
8-
from ._polytypes import (
9-
_FuncBinOp,
10-
_FuncCompanion,
11-
_FuncDer,
12-
_FuncFit,
13-
_FuncFromRoots,
14-
_FuncGauss,
15-
_FuncInteg,
16-
_FuncLine,
17-
_FuncPoly2Ortho,
18-
_FuncPow,
19-
_FuncRoots,
20-
_FuncUnOp,
21-
_FuncVal,
22-
_FuncVal2D,
23-
_FuncVal3D,
24-
_FuncValFromRoots,
25-
_FuncVander,
26-
_FuncVander2D,
27-
_FuncVander3D,
28-
_FuncWeight,
8+
from .legendre import (
9+
leg2poly as herm2poly,
10+
legadd as hermadd,
11+
legcompanion as hermcompanion,
12+
legder as hermder,
13+
legdiv as hermdiv,
14+
legfit as hermfit,
15+
legfromroots as hermfromroots,
16+
leggauss as hermgauss,
17+
leggrid2d as hermgrid2d,
18+
leggrid3d as hermgrid3d,
19+
legint as hermint,
20+
legline as hermline,
21+
legmul as hermmul,
22+
legmulx as hermmulx,
23+
legpow as hermpow,
24+
legroots as hermroots,
25+
legsub as hermsub,
26+
legtrim as hermtrim,
27+
legval as hermval,
28+
legval2d as hermval2d,
29+
legval3d as hermval3d,
30+
legvander as hermvander,
31+
legvander2d as hermvander2d,
32+
legvander3d as hermvander3d,
33+
legweight as hermweight,
34+
poly2leg as poly2herm,
2935
)
30-
from .polyutils import trimcoef as hermtrim
3136

3237
__all__ = [
3338
"Hermite",
@@ -63,43 +68,20 @@ __all__ = [
6368
"poly2herm",
6469
]
6570

71+
###
72+
6673
_ShapeT = TypeVar("_ShapeT", bound=tuple[int, ...])
6774

75+
###
76+
6877
hermdomain: Final[Array_1d[np.float64]] = ...
6978
hermzero: Final[Array_1d[np.int_]] = ...
7079
hermone: Final[Array_1d[np.int_]] = ...
7180
hermx: Final[Array_1d[np.int_]] = ...
7281

73-
poly2herm: Final[_FuncPoly2Ortho[L["poly2herm"]]] = ...
74-
herm2poly: Final[_FuncUnOp[L["herm2poly"]]] = ...
75-
hermline: Final[_FuncLine[L["hermline"]]] = ...
76-
hermfromroots: Final[_FuncFromRoots[L["hermfromroots"]]] = ...
77-
hermadd: Final[_FuncBinOp[L["hermadd"]]] = ...
78-
hermsub: Final[_FuncBinOp[L["hermsub"]]] = ...
79-
hermmulx: Final[_FuncUnOp[L["hermmulx"]]] = ...
80-
hermmul: Final[_FuncBinOp[L["hermmul"]]] = ...
81-
hermdiv: Final[_FuncBinOp[L["hermdiv"]]] = ...
82-
hermpow: Final[_FuncPow[L["hermpow"]]] = ...
83-
hermder: Final[_FuncDer[L["hermder"]]] = ...
84-
hermint: Final[_FuncInteg[L["hermint"]]] = ...
85-
hermval: Final[_FuncVal[L["hermval"]]] = ...
86-
hermval2d: Final[_FuncVal2D[L["hermval2d"]]] = ...
87-
hermval3d: Final[_FuncVal3D[L["hermval3d"]]] = ...
88-
hermvalfromroots: Final[_FuncValFromRoots[L["hermvalfromroots"]]] = ...
89-
hermgrid2d: Final[_FuncVal2D[L["hermgrid2d"]]] = ...
90-
hermgrid3d: Final[_FuncVal3D[L["hermgrid3d"]]] = ...
91-
hermvander: Final[_FuncVander[L["hermvander"]]] = ...
92-
hermvander2d: Final[_FuncVander2D[L["hermvander2d"]]] = ...
93-
hermvander3d: Final[_FuncVander3D[L["hermvander3d"]]] = ...
94-
hermfit: Final[_FuncFit[L["hermfit"]]] = ...
95-
hermcompanion: Final[_FuncCompanion[L["hermcompanion"]]] = ...
96-
hermroots: Final[_FuncRoots[L["hermroots"]]] = ...
97-
hermgauss: Final[_FuncGauss[L["hermgauss"]]] = ...
98-
hermweight: Final[_FuncWeight[L["hermweight"]]] = ...
99-
100-
def _normed_hermite_n(x: Array[np.float64, _ShapeT], n: int | np.intp) -> Array[np.float64, _ShapeT]: ...
101-
10282
class Hermite(ABCPolyBase):
10383
domain: Array_1d[np.float64] = ... # pyright: ignore[reportIncompatibleMethodOverride]
10484
window: Array_1d[np.float64] = ... # pyright: ignore[reportIncompatibleMethodOverride]
10585
basis_name: L["H"] = "H" # pyright: ignore[reportIncompatibleMethodOverride]
86+
87+
def _normed_hermite_n(x: Array[np.float64, _ShapeT], n: int | np.intp) -> Array[np.float64, _ShapeT]: ...

tool/.mypyignore-todo

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,6 @@ numpy.ma.core.mask_rowcols
5858
numpy.ma.extras.MAxisConcatenator.concatenate
5959
numpy.ma.mrecords.fromtextfile
6060

61-
numpy.polynomial.hermite.herm2poly
62-
numpy.polynomial.hermite.hermadd
63-
numpy.polynomial.hermite.hermcompanion
64-
numpy.polynomial.hermite.hermder
65-
numpy.polynomial.hermite.hermdiv
66-
numpy.polynomial.hermite.hermfit
67-
numpy.polynomial.hermite.hermfromroots
68-
numpy.polynomial.hermite.hermgauss
69-
numpy.polynomial.hermite.hermgrid2d
70-
numpy.polynomial.hermite.hermgrid3d
71-
numpy.polynomial.hermite.hermint
72-
numpy.polynomial.hermite.hermline
73-
numpy.polynomial.hermite.hermmul
74-
numpy.polynomial.hermite.hermmulx
75-
numpy.polynomial.hermite.hermpow
76-
numpy.polynomial.hermite.hermroots
77-
numpy.polynomial.hermite.hermsub
78-
numpy.polynomial.hermite.hermval
79-
numpy.polynomial.hermite.hermval2d
80-
numpy.polynomial.hermite.hermval3d
81-
numpy.polynomial.hermite.hermvalfromroots
82-
numpy.polynomial.hermite.hermvander
83-
numpy.polynomial.hermite.hermvander2d
84-
numpy.polynomial.hermite.hermvander3d
85-
numpy.polynomial.hermite.hermweight
86-
numpy.polynomial.hermite.poly2herm
87-
8861
numpy.polynomial.hermite_e.herme2poly
8962
numpy.polynomial.hermite_e.hermeadd
9063
numpy.polynomial.hermite_e.hermecompanion

0 commit comments

Comments
 (0)