Spaces:
Paused
Paused
File size: 1,377 Bytes
dc2106c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
from typing import Any, overload, TypeVar, List, Union
from numpy import floating, bool_, object_, ndarray
from numpy.typing import (
NDArray,
_FloatLike_co,
_ArrayLikeFloat_co,
_ArrayLikeObject_co,
)
_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any])
__all__: List[str]
@overload
def fix( # type: ignore[misc]
x: _FloatLike_co,
out: None = ...,
) -> floating[Any]: ...
@overload
def fix(
x: _ArrayLikeFloat_co,
out: None = ...,
) -> NDArray[floating[Any]]: ...
@overload
def fix(
x: _ArrayLikeObject_co,
out: None = ...,
) -> NDArray[object_]: ...
@overload
def fix(
x: Union[_ArrayLikeFloat_co, _ArrayLikeObject_co],
out: _ArrayType,
) -> _ArrayType: ...
@overload
def isposinf( # type: ignore[misc]
x: _FloatLike_co,
out: None = ...,
) -> bool_: ...
@overload
def isposinf(
x: _ArrayLikeFloat_co,
out: None = ...,
) -> NDArray[bool_]: ...
@overload
def isposinf(
x: _ArrayLikeFloat_co,
out: _ArrayType,
) -> _ArrayType: ...
@overload
def isneginf( # type: ignore[misc]
x: _FloatLike_co,
out: None = ...,
) -> bool_: ...
@overload
def isneginf(
x: _ArrayLikeFloat_co,
out: None = ...,
) -> NDArray[bool_]: ...
@overload
def isneginf(
x: _ArrayLikeFloat_co,
out: _ArrayType,
) -> _ArrayType: ...
|