File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3810,7 +3810,11 @@ class finfo(Generic[_FloatType]):
38103810 nmant : int
38113811 precision : int
38123812 resolution : _FloatType
3813- tiny : _FloatType
3813+ smallest_subnormal : _FloatType
3814+ @property
3815+ def smallest_normal (self ) -> _FloatType : ...
3816+ @property
3817+ def tiny (self ) -> _FloatType : ...
38143818
38153819 # NOTE: Not technically a property, but this is the only way we can
38163820 # access the precision of the underlying float
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class MachArLike(Generic[_NBit]):
2323 huge : floating [Any ],
2424 tiny : floating [Any ],
2525 ibeta : int ,
26+ smallest_subnormal : None | floating [Any ] = ...,
2627 # Expand `**kwargs` into keyword-only arguments
2728 machep : int ,
2829 negep : int ,
@@ -33,6 +34,8 @@ class MachArLike(Generic[_NBit]):
3334 irnd : int ,
3435 ngrd : int ,
3536 ) -> None : ...
37+ @property
38+ def smallest_subnormal (self ) -> NDArray [floating [_NBit ]]: ...
3639 eps : NDArray [floating [_NBit ]]
3740 epsilon : NDArray [floating [_NBit ]]
3841 epsneg : NDArray [floating [_NBit ]]
@@ -48,6 +51,7 @@ class MachArLike(Generic[_NBit]):
4851 ngrd : int
4952 precision : int
5053 resolution : NDArray [floating [_NBit ]]
54+ smallest_normal : NDArray [floating [_NBit ]]
5155 tiny : NDArray [floating [_NBit ]]
5256 title : str
5357 xmax : NDArray [floating [_NBit ]]
Original file line number Diff line number Diff line change 3434reveal_type (finfo_f8 .precision ) # E: int
3535reveal_type (finfo_f8 .resolution ) # E: {float64}
3636reveal_type (finfo_f8 .tiny ) # E: {float64}
37+ reveal_type (finfo_f8 .smallest_normal ) # E: {float64}
38+ reveal_type (finfo_f8 .smallest_subnormal ) # E: {float64}
3739reveal_type (finfo_f8 .machar ) # E: MachArLike[numpy.typing._64Bit]
3840
3941reveal_type (np .iinfo (i )) # E: iinfo[{int_}]
5658reveal_type (machar_f4 .tiny ) # E: numpy.ndarray[Any, numpy.dtype[{float32}]]
5759reveal_type (machar_f4 .xmax ) # E: numpy.ndarray[Any, numpy.dtype[{float32}]]
5860reveal_type (machar_f4 .xmin ) # E: numpy.ndarray[Any, numpy.dtype[{float32}]]
61+ reveal_type (machar_f4 .smallest_subnormal ) # E: numpy.ndarray[Any, numpy.dtype[{float32}]]
62+ reveal_type (machar_f4 .smallest_normal ) # E: numpy.ndarray[Any, numpy.dtype[{float32}]]
5963reveal_type (machar_f4 .iexp ) # E: int
6064reveal_type (machar_f4 .irnd ) # E: int
6165reveal_type (machar_f4 .it ) # E: int
You can’t perform that action at this time.
0 commit comments