forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_array_api_info.pyi
More file actions
62 lines (53 loc) · 1.32 KB
/
_array_api_info.pyi
File metadata and controls
62 lines (53 loc) · 1.32 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
from typing import TypedDict, Optional, Union, Tuple, List
from numpy._typing import DtypeLike
Capabilities = TypedDict(
"Capabilities",
{
"boolean indexing": bool,
"data-dependent shapes": bool,
},
)
DefaultDataTypes = TypedDict(
"DefaultDataTypes",
{
"real floating": DtypeLike,
"complex floating": DtypeLike,
"integral": DtypeLike,
"indexing": DtypeLike,
},
)
DataTypes = TypedDict(
"DataTypes",
{
"bool": DtypeLike,
"float32": DtypeLike,
"float64": DtypeLike,
"complex64": DtypeLike,
"complex128": DtypeLike,
"int8": DtypeLike,
"int16": DtypeLike,
"int32": DtypeLike,
"int64": DtypeLike,
"uint8": DtypeLike,
"uint16": DtypeLike,
"uint32": DtypeLike,
"uint64": DtypeLike,
},
total=False,
)
class __array_namespace_info__:
__module__: str
def capabilities(self) -> Capabilities: ...
def default_device(self) -> str: ...
def default_dtypes(
self,
*,
device: Optional[str] = None,
) -> DefaultDataTypes: ...
def dtypes(
self,
*,
device: Optional[str] = None,
kind: Optional[Union[str, Tuple[str, ...]]] = None,
) -> DataTypes: ...
def devices(self) -> List[str]: ...