summaryrefslogtreecommitdiff
path: root/numpy/lib/ufunclike.pyi
blob: 3443fa7ae53dae3e2a33e3d23e177f3e542e8086 (plain)
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
from typing import Any, overload, TypeVar, List, Union

from numpy import floating, bool_, ndarray
from numpy.typing import (
    _ArrayLikeFloat_co,
    _ArrayLikeObject_co,
    _ArrayOrScalar,
)

_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any])

__all__: List[str]

@overload
def fix(
    x: _ArrayLikeFloat_co,
    out: None = ...,
) -> _ArrayOrScalar[floating[Any]]: ...
@overload
def fix(
    x: _ArrayLikeObject_co,
    out: None = ...,
) -> Any: ...
@overload
def fix(
    x: Union[_ArrayLikeFloat_co, _ArrayLikeObject_co],
    out: _ArrayType,
) -> _ArrayType: ...

@overload
def isposinf(
    x: _ArrayLikeFloat_co,
    out: None = ...,
) -> _ArrayOrScalar[bool_]: ...
@overload
def isposinf(
    x: _ArrayLikeFloat_co,
    out: _ArrayType,
) -> _ArrayType: ...

@overload
def isneginf(
    x: _ArrayLikeFloat_co,
    out: None = ...,
) -> _ArrayOrScalar[bool_]: ...
@overload
def isneginf(
    x: _ArrayLikeFloat_co,
    out: _ArrayType,
) -> _ArrayType: ...