mbcp.mp_math.mp_math_typing
Description: 本模块用于内部类型提示
var RealNumber
= int | float
Type:
TypeAlias
Description: 实数
var Number
= RealNumber | complex
Type:
TypeAlias
Description: 数
var SingleVar
= TypeVar('SingleVar', bound=Number)
- Description: 单变量
var ArrayVar
= TypeVar('ArrayVar', bound=Iterable[Number])
- Description: 数组变量
var Var
= SingleVar | ArrayVar
Type:
TypeAlias
Description: 变量
var OneSingleVarFunc
= Callable[[SingleVar], SingleVar]
Type:
TypeAlias
Description: 一元单变量函数
var OneArrayFunc
= Callable[[ArrayVar], ArrayVar]
Type:
TypeAlias
Description: 一元数组函数
var OneVarFunc
= OneSingleVarFunc | OneArrayFunc
Type:
TypeAlias
Description: 一元函数
var TwoSingleVarsFunc
= Callable[[SingleVar, SingleVar], SingleVar]
Type:
TypeAlias
Description: 二元单变量函数
var TwoArraysFunc
= Callable[[ArrayVar, ArrayVar], ArrayVar]
Type:
TypeAlias
Description: 二元数组函数
var TwoVarsFunc
= TwoSingleVarsFunc | TwoArraysFunc
Type:
TypeAlias
Description: 二元函数
var ThreeSingleVarsFunc
= Callable[[SingleVar, SingleVar, SingleVar], SingleVar]
Type:
TypeAlias
Description: 三元单变量函数
var ThreeArraysFunc
= Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]
Type:
TypeAlias
Description: 三元数组函数
var ThreeVarsFunc
= ThreeSingleVarsFunc | ThreeArraysFunc
Type:
TypeAlias
Description: 三元函数
var MultiSingleVarsFunc
= Callable[..., SingleVar]
Type:
TypeAlias
Description: 多元单变量函数
var MultiArraysFunc
= Callable[..., ArrayVar]
Type:
TypeAlias
Description: 多元数组函数
var MultiVarsFunc
= MultiSingleVarsFunc | MultiArraysFunc
Type:
TypeAlias
Description: 多元函数