-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path__init__.pyi
More file actions
229 lines (198 loc) · 8.77 KB
/
__init__.pyi
File metadata and controls
229 lines (198 loc) · 8.77 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
import typing as tp
import datetime
import numpy as np # type: ignore
_T = tp.TypeVar('_T')
__version__: str
_TLabel = tp.Union[
tp.Hashable,
int,
bool,
np.bool_,
np.integer,
float,
complex,
np.inexact,
str,
bytes,
None,
np.datetime64,
np.timedelta64,
datetime.date,
datetime.datetime,
tp.Tuple['_TLabel', ...],
]
_TVShape = tp.TypeVar("_TVShape")
_1D = tp.Tuple[tp.Any]
_2D = tp.Tuple[tp.Any, tp.Any]
_TVDtypeAny = tp.TypeVar('_TVDtypeAny', bound=np.dtype)
_TVNDArrayAny = tp.TypeVar("_TVNDArrayAny", np.ndarray)
_T1DArrayInt64 = np.ndarray[_1D, np.dtype[np.int64]]
_T1DArrayBool = np.ndarray[_1D, np.dtype[np.bool_]]
_T1DArrayObject = np.ndarray[_1D, np.dtype[np.object_]]
_T2DArrayBool = np.ndarray[_2D, np.dtype[np.bool_]]
class ErrorInitTypeBlocks(RuntimeError):
def __init__(self, *args: tp.Any, **kwargs: tp.Any) -> None: ...
def with_traceback(self, tb: Exception) -> Exception: ...
def __setstate__(self) -> None: ...
class NonUniqueError(RuntimeError):
def __init__(self, *args: tp.Any, **kwargs: tp.Any) -> None: ...
def with_traceback(self, tb: Exception) -> Exception: ...
def __setstate__(self) -> None: ...
class ArrayGO:
values: np.ndarray
def __init__(
self, iterable: tp.Iterable[object], *, own_iterable: bool = ...
) -> None: ...
def __iter__(self) -> tp.Iterator[tp.Any]: ...
def __getitem__(self, __key: object) -> tp.Any: ...
def __len__(self) -> int: ...
def __getnewargs__(self) -> tp.Tuple[np.ndarray]: ...
def append(self, __value: object) -> None: ...
def copy(self: _T) -> _T: ...
def extend(self, __values: tp.Iterable[object]) -> None: ...
class TriMap:
def __init__(self, /, src_len: int, dst_len: int) -> None: ...
def __repr__(self) -> str: ...
def register_one(self, /, src_from: int, dst_from: int) -> None: ...
def register_unmatched_dst(self) -> None: ...
def register_many(self, /, src_from: int, dst_from: np.ndarray) -> None: ...
def finalize(self) -> None: ...
def is_many(self) -> bool: ...
def src_no_fill(self) -> bool: ...
def dst_no_fill(self) -> bool: ...
def map_src_no_fill(self, /, array_from: np.ndarray) -> np.ndarray: ...
def map_dst_no_fill(self, /, array_from: np.ndarray) -> np.ndarray: ...
def map_src_fill(self, /,
array_from: np.ndarray,
fill_value: tp.Any,
fill_value_dtype: np.dtype
) -> np.ndarray: ...
def map_dst_fill(self, /,
array_from: np.ndarray,
fill_value: tp.Any,
fill_value_dtype: np.dtype
) -> np.ndarray: ...
def map_merge(self, /,
array_from_src: np.ndarray,
array_from_dst: np.ndarray,
) -> np.ndarray: ...
class BlockIndex:
shape: tp.Tuple[int, int]
dtype: np.dtype
rows: int
columns: int
def __init__(
block_count: int = 0,
row_count: int = -1,
bir_count: int = 0,
bir_capacity: int = 8,
bir_bytes: bytes = b'',
dtype: np.dtype = None,
) -> None: ...
def register(self, __value: np.ndarray) -> bool: ...
def to_list(self,) -> tp.List[tp.Tuple[int, int]]: ...
def to_bytes(self,) -> bytes: ...
def copy(self,) -> 'BlockIndex': ...
def __len__(self,) -> int: ...
def __iter__(self,) -> tp.Iterator[tp.Tuple[int, int]]: ...
def __reversed__(self,) -> tp.Iterator[tp.Tuple[int, int]]: ...
def __getitem__(self, __key: int) -> tp.Tuple[int, int]: ...
def __getstate__(self,) -> tp.Tuple[int, int, int, int, bytes]: ...
def __setstate__(self, state: tp.Tuple[int, int, int, int, bytes]) -> None: ...
def get_block(self, __key: int) -> int: ...
def get_column(self, __key: int) -> int: ...
def iter_select(self,
__key: tp.Union[slice, np.ndarray, tp.List[int]],
) -> tp.Iterator[tp.Tuple[int, int]]: ...
def iter_contiguous(self,
__key: tp.Union[slice, np.ndarray, tp.List[int]],
*,
ascending: bool = False,
reduce: bool = False,
) -> tp.Iterator[tp.Tuple[int, tp.Union[slice, int]]]: ...
def iter_block(self) -> tp.Iterator[tp.Tuple[int, slice]]: ...
class FrozenAutoMap:
def __init__(self, labels: tp.Iterable[_TLabel] | np.ndarray = (), /,) -> None: ...
def get(self, __key: _TLabel, /,) -> int: ...
def keys(self) -> tp.Iterator[_TLabel]: ...
def items(self) -> tp.Iterator[tp.Tuple[_TLabel, int]]: ...
def values(self) -> tp.Iterator[int]: ...
def get_all(self, __key: list[_TLabel] | np.ndarray) -> np.ndarray: ...
def get_any(self, __key: list[_TLabel] | np.ndarray) -> list[int]: ...
def __iter__(self) -> tp.Iterator[_TLabel]: ...
def __getitem__(self, __key: tp.Any) -> int: ...
def __contains__(self, __key: tp.Any) -> bool: ...
def __getnewargs__(self) -> tp.Any: ...
def __reversed__(self) -> tp.Any: ...
def __sizeof__(self) -> int: ...
def __getstate__(self) -> tp.Any: ...
def __setstate__(self, __state: tp.Any) -> None: ...
def __len__(self) -> int: ...
def __or__(self) -> tp.Any: ...
def __ror__(self) -> tp.Any: ...
class AutoMap(FrozenAutoMap):
def __init__(self, labels: tp.Iterable[_TLabel] | np.ndarray = (), /,) -> None: ...
def __ior__(self) -> tp.Any: ...
def add(self, __key: _TLabel) -> None: ...
def update(self, __keys: tp.Iterable[_TLabel] | np.ndarray) -> None: ...
def iterable_str_to_array_1d(
iterable: tp.Iterable[str],
*,
dtype: tp.Optional[tp.Any] = None,
thousandschar: str = ',',
decimalchar: str = '.',
) -> np.ndarray: ...
def delimited_to_arrays(
file_like: tp.Iterable[str],
*,
axis: int = 0,
dtypes: tp.Optional[tp.Callable[[int], tp.Any]] = None,
line_select: tp.Optional[tp.Callable[[int], bool]] = None,
delimiter: str = ',',
doublequote: bool = True,
escapechar: tp.Optional[str] = '',
quotechar: tp.Optional[str] = '"',
quoting: int = 0,
skipinitialspace: bool = False,
strict: bool = False,
thousandschar: str = ',',
decimalchar: str = '.',
) -> tp.List[np.array]: ...
def split_after_count(
string: str,
*,
delimiter: str = ',',
count: int = 0,
doublequote: bool = True,
escapechar: tp.Optional[str] = '',
quotechar: tp.Optional[str] = '"',
quoting: int = 0,
strict: bool = False,
) -> tp.Tuple[str, str]: ...
def count_iteration(__iterable: tp.Iterable) -> int: ...
def immutable_filter(__array: _TVNDArrayAny) -> _TVNDArrayAny: ...
def mloc(__array: np.ndarray) -> int: ...
def name_filter(__name: _TLabel) -> _TLabel: ...
def shape_filter(__array: np.ndarray[_1D, _TVDtypeAny] | np.ndarray[_2D, _TVDtypeAny]) -> np.ndarray[_2D, _TVDtypeAny]: ...
def column_2d_filter(__array: np.ndarray[_1D, _TVDtypeAny] | np.ndarray[_2D, _TVDtypeAny]) -> np.ndarray[_2D, _TVDtypeAny]: ...
def column_1d_filter(__array: np.ndarray[_1D, _TVDtypeAny] | np.ndarray[_2D, _TVDtypeAny]) -> np.ndarray[_1D, _TVDtypeAny]: ...
def row_1d_filter(__array: np.ndarray[_1D, _TVDtypeAny] | np.ndarray[_2D, _TVDtypeAny]) -> np.ndarray[_1D, _TVDtypeAny]: ...
def array_deepcopy(__array: _TVNDArrayAny, memo: tp.Optional[tp.Dict[int, tp.Any]]) -> _TVNDArrayAny: ...
def resolve_dtype(__d1: np.dtype, __d2: np.dtype) -> np.dtype: ...
def resolve_dtype_iter(__dtypes: tp.Iterable[np.dtype]) -> np.dtype: ...
def isna_element(__value: tp.Any, include_none: bool = True) -> bool: ...
def dtype_from_element(__value: tp.Optional[_TLabel]) -> np.dtype: ...
def get_new_indexers_and_screen(indexers: _T1DArrayInt64, positions: _T1DArrayInt64) -> tp.Tuple[_T1DArrayInt64, _T1DArrayInt64]: ...
def first_true_1d(__array: _T1DArrayBool, *, forward: bool) -> int: ...
def first_true_2d(__array: _T2DArrayBool, *, forward: bool, axis: int) -> _T1DArrayInt64: ...
def nonzero_1d(__array: _T1DArrayBool, /) -> _T1DArrayInt64: ...
def is_objectable_dt64(__array: np.ndarray, /) -> bool: ...
def is_objectable(__array: np.ndarray, /) -> bool: ...
@tp.overload
def astype_array(__array: np.ndarray[_TVShape, tp.Any], __dtype: _TVDtypeAny, /) -> np.ndarray[_TVShape, _TVDtypeAny]: ...
@tp.overload
def astype_array(__array: np.ndarray[_TVShape, tp.Any], __dtype: None, /) -> np.ndarray[_TVShape, np.int64]: ...
def astype_array(__array: np.ndarray[_TVShape, tp.Any], __dtype: _TVDtypeAny | None, /) -> np.ndarray[_TVShape, _TVDtypeAny] | np.ndarray[_TVShape, np.int64]: ...
def slice_to_ascending_slice(__slice: slice, __size: int) -> slice: ...
def array_to_tuple_array(__array: np.ndarray) -> _T1DArrayObject: ...
def array_to_tuple_iter(__array: np.ndarray) -> tp.Iterator[tp.Tuple[tp.Any, ...]]: ...