mbcp/docs/api/mp_math/mp_math_typing.md

38 lines
1.3 KiB
Markdown
Raw Normal View History

2024-08-28 10:52:17 +08:00
---
2024-08-28 12:02:30 +08:00
title: mbcp.mp_math.mp_math_typing
2024-08-28 10:52:17 +08:00
---
2024-08-28 12:02:30 +08:00
### ***var*** `RealNumber: TypeAlias = int | float`
### ***var*** `Number: TypeAlias = RealNumber | complex`
2024-08-28 10:52:17 +08:00
### ***var*** `SingleVar = TypeVar('SingleVar', bound=Number)`
2024-08-28 12:02:30 +08:00
### ***var*** `ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])`
2024-08-28 10:52:17 +08:00
2024-08-28 12:02:30 +08:00
### ***var*** `Var: TypeAlias = SingleVar | ArrayVar`
2024-08-28 10:52:17 +08:00
2024-08-28 12:02:30 +08:00
### ***var*** `OneSingleVarFunc: TypeAlias = Callable[[SingleVar], SingleVar]`
### ***var*** `OneArrayFunc: TypeAlias = Callable[[ArrayVar], ArrayVar]`
### ***var*** `OneVarFunc: TypeAlias = OneSingleVarFunc | OneArrayFunc`
### ***var*** `TwoSingleVarsFunc: TypeAlias = Callable[[SingleVar, SingleVar], SingleVar]`
### ***var*** `TwoArraysFunc: TypeAlias = Callable[[ArrayVar, ArrayVar], ArrayVar]`
### ***var*** `TwoVarsFunc: TypeAlias = TwoSingleVarsFunc | TwoArraysFunc`
### ***var*** `ThreeSingleVarsFunc: TypeAlias = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]`
### ***var*** `ThreeArraysFunc: TypeAlias = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]`
### ***var*** `ThreeVarsFunc: TypeAlias = ThreeSingleVarsFunc | ThreeArraysFunc`
### ***var*** `MultiSingleVarsFunc: TypeAlias = Callable[..., SingleVar]`
2024-08-28 10:52:17 +08:00
2024-08-28 12:02:30 +08:00
### ***var*** `MultiArraysFunc: TypeAlias = Callable[..., ArrayVar]`
2024-08-28 10:52:17 +08:00
2024-08-28 12:02:30 +08:00
### ***var*** `MultiVarsFunc: TypeAlias = MultiSingleVarsFunc | MultiArraysFunc`
2024-08-28 10:52:17 +08:00