增加环绕侦察场景适配
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
from _typeshed import ConvertibleToInt
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Any, Concatenate, Final, Self, TypeVar, overload
|
||||
from typing import Literal as L
|
||||
from typing import (
|
||||
Any,
|
||||
ClassVar,
|
||||
Concatenate,
|
||||
Final,
|
||||
Literal as L,
|
||||
Self,
|
||||
TypeVar,
|
||||
overload,
|
||||
)
|
||||
|
||||
import numpy as np
|
||||
import numpy.typing as npt
|
||||
@@ -21,13 +30,11 @@ from ._polytypes import (
|
||||
_FuncLine,
|
||||
_FuncPoly2Ortho,
|
||||
_FuncPow,
|
||||
_FuncPts,
|
||||
_FuncRoots,
|
||||
_FuncUnOp,
|
||||
_FuncVal,
|
||||
_FuncVal2D,
|
||||
_FuncVal3D,
|
||||
_FuncValFromRoots,
|
||||
_FuncVander,
|
||||
_FuncVander2D,
|
||||
_FuncVander3D,
|
||||
@@ -75,95 +82,90 @@ __all__ = [
|
||||
]
|
||||
|
||||
_NumberOrObjectT = TypeVar("_NumberOrObjectT", bound=np.number | np.object_)
|
||||
_CoefScalarT = TypeVar("_CoefScalarT", bound=np.number | np.bool | np.object_)
|
||||
|
||||
def _cseries_to_zseries(c: npt.NDArray[_NumberOrObjectT]) -> _Series[_NumberOrObjectT]: ...
|
||||
def _zseries_to_cseries(zs: npt.NDArray[_NumberOrObjectT]) -> _Series[_NumberOrObjectT]: ...
|
||||
def _zseries_mul(
|
||||
z1: npt.NDArray[_NumberOrObjectT],
|
||||
z2: npt.NDArray[_NumberOrObjectT],
|
||||
) -> _Series[_NumberOrObjectT]: ...
|
||||
def _zseries_div(
|
||||
z1: npt.NDArray[_NumberOrObjectT],
|
||||
z2: npt.NDArray[_NumberOrObjectT],
|
||||
) -> _Series[_NumberOrObjectT]: ...
|
||||
def _zseries_mul(z1: npt.NDArray[_NumberOrObjectT], z2: npt.NDArray[_NumberOrObjectT]) -> _Series[_NumberOrObjectT]: ...
|
||||
def _zseries_div(z1: npt.NDArray[_NumberOrObjectT], z2: npt.NDArray[_NumberOrObjectT]) -> _Series[_NumberOrObjectT]: ...
|
||||
def _zseries_der(zs: npt.NDArray[_NumberOrObjectT]) -> _Series[_NumberOrObjectT]: ...
|
||||
def _zseries_int(zs: npt.NDArray[_NumberOrObjectT]) -> _Series[_NumberOrObjectT]: ...
|
||||
|
||||
poly2cheb: _FuncPoly2Ortho[L["poly2cheb"]]
|
||||
cheb2poly: _FuncUnOp[L["cheb2poly"]]
|
||||
poly2cheb: Final[_FuncPoly2Ortho] = ...
|
||||
cheb2poly: Final[_FuncUnOp] = ...
|
||||
|
||||
chebdomain: Final[_Array2[np.float64]]
|
||||
chebzero: Final[_Array1[np.int_]]
|
||||
chebone: Final[_Array1[np.int_]]
|
||||
chebx: Final[_Array2[np.int_]]
|
||||
chebdomain: Final[_Array2[np.float64]] = ...
|
||||
chebzero: Final[_Array1[np.int_]] = ...
|
||||
chebone: Final[_Array1[np.int_]] = ...
|
||||
chebx: Final[_Array2[np.int_]] = ...
|
||||
|
||||
chebline: _FuncLine[L["chebline"]]
|
||||
chebfromroots: _FuncFromRoots[L["chebfromroots"]]
|
||||
chebadd: _FuncBinOp[L["chebadd"]]
|
||||
chebsub: _FuncBinOp[L["chebsub"]]
|
||||
chebmulx: _FuncUnOp[L["chebmulx"]]
|
||||
chebmul: _FuncBinOp[L["chebmul"]]
|
||||
chebdiv: _FuncBinOp[L["chebdiv"]]
|
||||
chebpow: _FuncPow[L["chebpow"]]
|
||||
chebder: _FuncDer[L["chebder"]]
|
||||
chebint: _FuncInteg[L["chebint"]]
|
||||
chebval: _FuncVal[L["chebval"]]
|
||||
chebval2d: _FuncVal2D[L["chebval2d"]]
|
||||
chebval3d: _FuncVal3D[L["chebval3d"]]
|
||||
chebvalfromroots: _FuncValFromRoots[L["chebvalfromroots"]]
|
||||
chebgrid2d: _FuncVal2D[L["chebgrid2d"]]
|
||||
chebgrid3d: _FuncVal3D[L["chebgrid3d"]]
|
||||
chebvander: _FuncVander[L["chebvander"]]
|
||||
chebvander2d: _FuncVander2D[L["chebvander2d"]]
|
||||
chebvander3d: _FuncVander3D[L["chebvander3d"]]
|
||||
chebfit: _FuncFit[L["chebfit"]]
|
||||
chebcompanion: _FuncCompanion[L["chebcompanion"]]
|
||||
chebroots: _FuncRoots[L["chebroots"]]
|
||||
chebgauss: _FuncGauss[L["chebgauss"]]
|
||||
chebweight: _FuncWeight[L["chebweight"]]
|
||||
chebpts1: _FuncPts[L["chebpts1"]]
|
||||
chebpts2: _FuncPts[L["chebpts2"]]
|
||||
chebline: Final[_FuncLine] = ...
|
||||
chebfromroots: Final[_FuncFromRoots] = ...
|
||||
chebadd: Final[_FuncBinOp] = ...
|
||||
chebsub: Final[_FuncBinOp] = ...
|
||||
chebmulx: Final[_FuncUnOp] = ...
|
||||
chebmul: Final[_FuncBinOp] = ...
|
||||
chebdiv: Final[_FuncBinOp] = ...
|
||||
chebpow: Final[_FuncPow] = ...
|
||||
chebder: Final[_FuncDer] = ...
|
||||
chebint: Final[_FuncInteg] = ...
|
||||
chebval: Final[_FuncVal] = ...
|
||||
chebval2d: Final[_FuncVal2D] = ...
|
||||
chebval3d: Final[_FuncVal3D] = ...
|
||||
chebgrid2d: Final[_FuncVal2D] = ...
|
||||
chebgrid3d: Final[_FuncVal3D] = ...
|
||||
chebvander: Final[_FuncVander] = ...
|
||||
chebvander2d: Final[_FuncVander2D] = ...
|
||||
chebvander3d: Final[_FuncVander3D] = ...
|
||||
chebfit: Final[_FuncFit] = ...
|
||||
chebcompanion: Final[_FuncCompanion] = ...
|
||||
chebroots: Final[_FuncRoots] = ...
|
||||
chebgauss: Final[_FuncGauss] = ...
|
||||
chebweight: Final[_FuncWeight] = ...
|
||||
def chebpts1(npts: ConvertibleToInt) -> np.ndarray[tuple[int], np.dtype[np.float64]]: ...
|
||||
def chebpts2(npts: ConvertibleToInt) -> np.ndarray[tuple[int], np.dtype[np.float64]]: ...
|
||||
|
||||
# keep in sync with `Chebyshev.interpolate`
|
||||
_RT = TypeVar("_RT", bound=np.number | np.bool | np.object_)
|
||||
# keep in sync with `Chebyshev.interpolate` (minus `domain` parameter)
|
||||
@overload
|
||||
def chebinterpolate(
|
||||
func: np.ufunc,
|
||||
deg: _IntLike_co,
|
||||
args: tuple[()] = ...,
|
||||
args: tuple[()] = (),
|
||||
) -> npt.NDArray[np.float64 | np.complex128 | np.object_]: ...
|
||||
@overload
|
||||
def chebinterpolate(
|
||||
func: Callable[[npt.NDArray[np.float64]], _RT],
|
||||
func: Callable[[npt.NDArray[np.float64]], _CoefScalarT],
|
||||
deg: _IntLike_co,
|
||||
args: tuple[()] = ...,
|
||||
) -> npt.NDArray[_RT]: ...
|
||||
args: tuple[()] = (),
|
||||
) -> npt.NDArray[_CoefScalarT]: ...
|
||||
@overload
|
||||
def chebinterpolate(
|
||||
func: Callable[Concatenate[npt.NDArray[np.float64], ...], _RT],
|
||||
func: Callable[Concatenate[npt.NDArray[np.float64], ...], _CoefScalarT],
|
||||
deg: _IntLike_co,
|
||||
args: Iterable[Any],
|
||||
) -> npt.NDArray[_RT]: ...
|
||||
) -> npt.NDArray[_CoefScalarT]: ...
|
||||
|
||||
class Chebyshev(ABCPolyBase[L["T"]]):
|
||||
basis_name: ClassVar[L["T"]] = "T" # pyright: ignore[reportIncompatibleMethodOverride]
|
||||
domain: _Array2[np.float64 | Any] = ... # pyright: ignore[reportIncompatibleMethodOverride]
|
||||
window: _Array2[np.float64 | Any] = ... # pyright: ignore[reportIncompatibleMethodOverride]
|
||||
|
||||
@overload
|
||||
@classmethod
|
||||
def interpolate(
|
||||
cls,
|
||||
func: Callable[[npt.NDArray[np.float64]], _CoefSeries],
|
||||
deg: _IntLike_co,
|
||||
domain: _SeriesLikeCoef_co | None = ...,
|
||||
args: tuple[()] = ...,
|
||||
domain: _SeriesLikeCoef_co | None = None,
|
||||
args: tuple[()] = (),
|
||||
) -> Self: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def interpolate(
|
||||
cls,
|
||||
func: Callable[
|
||||
Concatenate[npt.NDArray[np.float64], ...],
|
||||
_CoefSeries,
|
||||
],
|
||||
func: Callable[Concatenate[npt.NDArray[np.float64], ...], _CoefSeries],
|
||||
deg: _IntLike_co,
|
||||
domain: _SeriesLikeCoef_co | None = ...,
|
||||
domain: _SeriesLikeCoef_co | None = None,
|
||||
*,
|
||||
args: Iterable[Any],
|
||||
) -> Self: ...
|
||||
@@ -171,10 +173,7 @@ class Chebyshev(ABCPolyBase[L["T"]]):
|
||||
@classmethod
|
||||
def interpolate(
|
||||
cls,
|
||||
func: Callable[
|
||||
Concatenate[npt.NDArray[np.float64], ...],
|
||||
_CoefSeries,
|
||||
],
|
||||
func: Callable[Concatenate[npt.NDArray[np.float64], ...], _CoefSeries],
|
||||
deg: _IntLike_co,
|
||||
domain: _SeriesLikeCoef_co | None,
|
||||
args: Iterable[Any],
|
||||
|
||||
Reference in New Issue
Block a user