arraykit 0.5.0__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arraykit/__init__.py +29 -0
- arraykit/__init__.pyi +140 -0
- arraykit/_arraykit.c +6035 -0
- arraykit/_arraykit.cp312-win_amd64.pyd +0 -0
- arraykit/py.typed +0 -0
- arraykit-0.5.0.dist-info/LICENSE.txt +37 -0
- arraykit-0.5.0.dist-info/METADATA +29 -0
- arraykit-0.5.0.dist-info/RECORD +10 -0
- arraykit-0.5.0.dist-info/WHEEL +5 -0
- arraykit-0.5.0.dist-info/top_level.txt +1 -0
arraykit/__init__.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# pylint: disable=W0611
|
|
2
|
+
# pylint: disable=E0401
|
|
3
|
+
# pylint: disable=C0414
|
|
4
|
+
|
|
5
|
+
from ._arraykit import __version__
|
|
6
|
+
from ._arraykit import ArrayGO as ArrayGO
|
|
7
|
+
from ._arraykit import BlockIndex as BlockIndex
|
|
8
|
+
from ._arraykit import ErrorInitTypeBlocks as ErrorInitTypeBlocks
|
|
9
|
+
|
|
10
|
+
from ._arraykit import immutable_filter as immutable_filter
|
|
11
|
+
from ._arraykit import mloc as mloc
|
|
12
|
+
from ._arraykit import name_filter as name_filter
|
|
13
|
+
from ._arraykit import shape_filter as shape_filter
|
|
14
|
+
from ._arraykit import column_2d_filter as column_2d_filter
|
|
15
|
+
from ._arraykit import column_1d_filter as column_1d_filter
|
|
16
|
+
from ._arraykit import row_1d_filter as row_1d_filter
|
|
17
|
+
from ._arraykit import array_deepcopy as array_deepcopy
|
|
18
|
+
from ._arraykit import resolve_dtype as resolve_dtype
|
|
19
|
+
from ._arraykit import resolve_dtype_iter as resolve_dtype_iter
|
|
20
|
+
from ._arraykit import isna_element as isna_element
|
|
21
|
+
from ._arraykit import dtype_from_element as dtype_from_element
|
|
22
|
+
from ._arraykit import delimited_to_arrays as delimited_to_arrays
|
|
23
|
+
from ._arraykit import iterable_str_to_array_1d as iterable_str_to_array_1d
|
|
24
|
+
from ._arraykit import get_new_indexers_and_screen as get_new_indexers_and_screen
|
|
25
|
+
from ._arraykit import split_after_count as split_after_count
|
|
26
|
+
from ._arraykit import count_iteration as count_iteration
|
|
27
|
+
from ._arraykit import first_true_1d as first_true_1d
|
|
28
|
+
from ._arraykit import first_true_2d as first_true_2d
|
|
29
|
+
from ._arraykit import slice_to_ascending_slice as slice_to_ascending_slice
|
arraykit/__init__.pyi
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import typing as tp
|
|
2
|
+
import datetime
|
|
3
|
+
|
|
4
|
+
import numpy as np # type: ignore
|
|
5
|
+
|
|
6
|
+
_T = tp.TypeVar('_T')
|
|
7
|
+
|
|
8
|
+
__version__: str
|
|
9
|
+
|
|
10
|
+
_TLabel = tp.Union[
|
|
11
|
+
tp.Hashable,
|
|
12
|
+
int,
|
|
13
|
+
bool,
|
|
14
|
+
np.bool_,
|
|
15
|
+
np.integer,
|
|
16
|
+
float,
|
|
17
|
+
complex,
|
|
18
|
+
np.inexact,
|
|
19
|
+
str,
|
|
20
|
+
bytes,
|
|
21
|
+
None,
|
|
22
|
+
np.datetime64,
|
|
23
|
+
np.timedelta64,
|
|
24
|
+
datetime.date,
|
|
25
|
+
datetime.datetime,
|
|
26
|
+
tp.Tuple['_TLabel'],
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
class ErrorInitTypeBlocks(RuntimeError):
|
|
30
|
+
def __init__(self, *args: tp.Any, **kwargs: tp.Any) -> None: ...
|
|
31
|
+
def with_traceback(self, tb: Exception) -> Exception: ...
|
|
32
|
+
def __setstate__(self) -> None: ...
|
|
33
|
+
|
|
34
|
+
class ArrayGO:
|
|
35
|
+
|
|
36
|
+
values: np.ndarray
|
|
37
|
+
def __init__(
|
|
38
|
+
self, iterable: tp.Iterable[object], *, own_iterable: bool = ...
|
|
39
|
+
) -> None: ...
|
|
40
|
+
def __iter__(self) -> tp.Iterator[tp.Any]: ...
|
|
41
|
+
def __getitem__(self, __key: object) -> tp.Any: ...
|
|
42
|
+
def __len__(self) -> int: ...
|
|
43
|
+
def __getnewargs__(self) -> tp.Tuple[np.ndarray]: ...
|
|
44
|
+
def append(self, __value: object) -> None: ...
|
|
45
|
+
def copy(self: _T) -> _T: ...
|
|
46
|
+
def extend(self, __values: tp.Iterable[object]) -> None: ...
|
|
47
|
+
|
|
48
|
+
class BlockIndex:
|
|
49
|
+
shape: tp.Tuple[int, int]
|
|
50
|
+
dtype: np.dtype
|
|
51
|
+
rows: int
|
|
52
|
+
columns: int
|
|
53
|
+
|
|
54
|
+
def __init__(
|
|
55
|
+
block_count: int = 0,
|
|
56
|
+
row_count: int = -1,
|
|
57
|
+
bir_count: int = 0,
|
|
58
|
+
bir_capacity: int = 8,
|
|
59
|
+
bir_bytes: bytes = b'',
|
|
60
|
+
dtype: np.dtype = None,
|
|
61
|
+
) -> None: ...
|
|
62
|
+
def register(self, __value: np.ndarray) -> bool: ...
|
|
63
|
+
def to_list(self,) -> tp.List[tp.Tuple[int, int]]: ...
|
|
64
|
+
def to_bytes(self,) -> bytes: ...
|
|
65
|
+
def copy(self,) -> 'BlockIndex': ...
|
|
66
|
+
def __len__(self,) -> int: ...
|
|
67
|
+
def __iter__(self,) -> tp.Iterator[tp.Tuple[int, int]]: ...
|
|
68
|
+
def __reversed__(self,) -> tp.Iterator[tp.Tuple[int, int]]: ...
|
|
69
|
+
def __getitem__(self, __key: int) -> tp.Tuple[int, int]: ...
|
|
70
|
+
def __getstate__(self,) -> tp.Tuple[int, int, int, int, bytes]: ...
|
|
71
|
+
def __setstate__(self, state: tp.Tuple[int, int, int, int, bytes]) -> None: ...
|
|
72
|
+
def get_block(self, __key: int) -> int: ...
|
|
73
|
+
def get_column(self, __key: int) -> int: ...
|
|
74
|
+
def iter_select(self,
|
|
75
|
+
__key: tp.Union[slice, np.ndarray, tp.List[int]],
|
|
76
|
+
) -> tp.Iterator[tp.Tuple[int, int]]: ...
|
|
77
|
+
def iter_contiguous(self,
|
|
78
|
+
__key: tp.Union[slice, np.ndarray, tp.List[int]],
|
|
79
|
+
*,
|
|
80
|
+
ascending: bool = False,
|
|
81
|
+
reduce: bool = False,
|
|
82
|
+
) -> tp.Iterator[tp.Tuple[int, tp.Union[slice, int]]]: ...
|
|
83
|
+
def iter_block(self) -> tp.Iterator[tp.Tuple[int, slice]]: ...
|
|
84
|
+
|
|
85
|
+
def iterable_str_to_array_1d(
|
|
86
|
+
iterable: tp.Iterable[str],
|
|
87
|
+
*,
|
|
88
|
+
dtype: tp.Optional[tp.Any] = None,
|
|
89
|
+
thousandschar: str = ',',
|
|
90
|
+
decimalchar: str = '.',
|
|
91
|
+
) -> np.ndarray: ...
|
|
92
|
+
|
|
93
|
+
def delimited_to_arrays(
|
|
94
|
+
file_like: tp.Iterable[str],
|
|
95
|
+
*,
|
|
96
|
+
axis: int = 0,
|
|
97
|
+
dtypes: tp.Optional[tp.Callable[[int], tp.Any]] = None,
|
|
98
|
+
line_select: tp.Optional[tp.Callable[[int], bool]] = None,
|
|
99
|
+
delimiter: str = ',',
|
|
100
|
+
doublequote: bool = True,
|
|
101
|
+
escapechar: tp.Optional[str] = '',
|
|
102
|
+
quotechar: tp.Optional[str] = '"',
|
|
103
|
+
quoting: int = 0,
|
|
104
|
+
skipinitialspace: bool = False,
|
|
105
|
+
strict: bool = False,
|
|
106
|
+
thousandschar: str = ',',
|
|
107
|
+
decimalchar: str = '.',
|
|
108
|
+
) -> tp.List[np.array]: ...
|
|
109
|
+
|
|
110
|
+
def split_after_count(
|
|
111
|
+
string: str,
|
|
112
|
+
*,
|
|
113
|
+
delimiter: str = ',',
|
|
114
|
+
count: int = 0,
|
|
115
|
+
doublequote: bool = True,
|
|
116
|
+
escapechar: tp.Optional[str] = '',
|
|
117
|
+
quotechar: tp.Optional[str] = '"',
|
|
118
|
+
quoting: int = 0,
|
|
119
|
+
strict: bool = False,
|
|
120
|
+
) -> tp.Tuple[str, str]: ...
|
|
121
|
+
|
|
122
|
+
def count_iteration(__iterable: tp.Iterable) -> int: ...
|
|
123
|
+
|
|
124
|
+
def immutable_filter(__array: np.ndarray) -> np.ndarray: ...
|
|
125
|
+
def mloc(__array: np.ndarray) -> int: ...
|
|
126
|
+
def name_filter(__name: _TLabel) -> _TLabel: ...
|
|
127
|
+
def shape_filter(__array: np.ndarray) -> np.ndarray: ...
|
|
128
|
+
def column_2d_filter(__array: np.ndarray) -> np.ndarray: ...
|
|
129
|
+
def column_1d_filter(__array: np.ndarray) -> np.ndarray: ...
|
|
130
|
+
def row_1d_filter(__array: np.ndarray) -> np.ndarray: ...
|
|
131
|
+
def array_deepcopy(__array: np.ndarray, memo: tp.Optional[tp.Dict[int, tp.Any]]) -> np.ndarray: ...
|
|
132
|
+
def resolve_dtype(__d1: np.dtype, __d2: np.dtype) -> np.dtype: ...
|
|
133
|
+
def resolve_dtype_iter(__dtypes: tp.Iterable[np.dtype]) -> np.dtype: ...
|
|
134
|
+
def isna_element(__value: tp.Any, include_none: bool = True) -> bool: ...
|
|
135
|
+
def dtype_from_element(__value: tp.Optional[_TLabel]) -> np.dtype: ...
|
|
136
|
+
def get_new_indexers_and_screen(indexers: np.ndarray, positions: np.ndarray) -> tp.Tuple[np.ndarray, np.ndarray]: ...
|
|
137
|
+
|
|
138
|
+
def first_true_1d(__array: np.ndarray, *, forward: bool) -> int: ...
|
|
139
|
+
def first_true_2d(__array: np.ndarray, *, forward: bool, axis: int) -> np.ndarray: ...
|
|
140
|
+
def slice_to_ascending_slice(__slice: slice, __size: int) -> slice: ...
|