-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Expand file tree
/
Copy path_exceptions.pyi
More file actions
48 lines (38 loc) · 1.75 KB
/
_exceptions.pyi
File metadata and controls
48 lines (38 loc) · 1.75 KB
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
from collections.abc import Iterable
from typing import Any, Final, overload
import numpy as np
from numpy import _CastingKind
###
class UFuncTypeError(TypeError):
ufunc: Final[np.ufunc]
def __init__(self, /, ufunc: np.ufunc) -> None: ...
class _UFuncNoLoopError(UFuncTypeError):
dtypes: tuple[np.dtype, ...]
def __init__(self, /, ufunc: np.ufunc, dtypes: Iterable[np.dtype]) -> None: ...
class _UFuncBinaryResolutionError(_UFuncNoLoopError):
dtypes: tuple[np.dtype, np.dtype] # pyrefly: ignore[bad-override]
def __init__(self, /, ufunc: np.ufunc, dtypes: Iterable[np.dtype]) -> None: ...
class _UFuncCastingError(UFuncTypeError):
casting: Final[_CastingKind]
from_: Final[np.dtype]
to: Final[np.dtype]
def __init__(self, /, ufunc: np.ufunc, casting: _CastingKind, from_: np.dtype, to: np.dtype) -> None: ...
class _UFuncInputCastingError(_UFuncCastingError):
in_i: Final[int]
def __init__(self, /, ufunc: np.ufunc, casting: _CastingKind, from_: np.dtype, to: np.dtype, i: int) -> None: ...
class _UFuncOutputCastingError(_UFuncCastingError):
out_i: Final[int]
def __init__(self, /, ufunc: np.ufunc, casting: _CastingKind, from_: np.dtype, to: np.dtype, i: int) -> None: ...
class _ArrayMemoryError(MemoryError):
shape: tuple[int, ...]
dtype: np.dtype
def __init__(self, /, shape: tuple[int, ...], dtype: np.dtype) -> None: ...
@property
def _total_size(self) -> int: ...
@staticmethod
def _size_to_string(num_bytes: int) -> str: ...
@overload
def _unpack_tuple[T](tup: tuple[T]) -> T: ...
@overload
def _unpack_tuple[TupleT: tuple[()] | tuple[Any, Any, *tuple[Any, ...]]](tup: TupleT) -> TupleT: ...
def _display_as_base[ExceptionT: Exception](cls: type[ExceptionT]) -> type[ExceptionT]: ...