diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2021-07-19 14:35:42 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-19 14:35:42 -0600 |
| commit | 45cfd110471ae9272da387bf8fc616c66cfcb703 (patch) | |
| tree | 77a2d4c9a75c9b1c6b0a310160217fb1fdda08d1 /numpy/core/getlimits.pyi | |
| parent | 4c37b8df70952d9192c528f1988e7285b44fd7ae (diff) | |
| parent | e993b014518241f483127f94ead39571ae5967f7 (diff) | |
| download | numpy-45cfd110471ae9272da387bf8fc616c66cfcb703.tar.gz | |
Merge pull request #19421 from BvB93/getlimits
ENH: Add annotations for `np.core.getlimits`
Diffstat (limited to 'numpy/core/getlimits.pyi')
| -rw-r--r-- | numpy/core/getlimits.pyi | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/numpy/core/getlimits.pyi b/numpy/core/getlimits.pyi new file mode 100644 index 000000000..983d05f36 --- /dev/null +++ b/numpy/core/getlimits.pyi @@ -0,0 +1,54 @@ +from typing import Any, Generic, List, Type, TypeVar + +from numpy import ( + finfo as finfo, + iinfo as iinfo, + floating, + signedinteger, +) + +from numpy.typing import NBitBase, NDArray + +_NBit = TypeVar("_NBit", bound=NBitBase) + +__all__: List[str] + +class MachArLike(Generic[_NBit]): + def __init__( + self, + ftype: Type[floating[_NBit]], + *, + eps: floating[Any], + epsneg: floating[Any], + huge: floating[Any], + tiny: floating[Any], + ibeta: int, + # Expand `**kwargs` into keyword-only arguments + machep: int, + negep: int, + minexp: int, + maxexp: int, + it: int, + iexp: int, + irnd: int, + ngrd: int, + ) -> None: ... + eps: NDArray[floating[_NBit]] + epsilon: NDArray[floating[_NBit]] + epsneg: NDArray[floating[_NBit]] + huge: NDArray[floating[_NBit]] + ibeta: signedinteger[_NBit] + iexp: int + irnd: int + it: int + machep: int + maxexp: int + minexp: int + negep: int + ngrd: int + precision: int + resolution: NDArray[floating[_NBit]] + tiny: NDArray[floating[_NBit]] + title: str + xmax: NDArray[floating[_NBit]] + xmin: NDArray[floating[_NBit]] |
