arraykit 1.3.1__tar.gz → 1.5.0__tar.gz

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.
Files changed (51) hide show
  1. {arraykit-1.3.1/arraykit.egg-info → arraykit-1.5.0}/PKG-INFO +13 -2
  2. {arraykit-1.3.1 → arraykit-1.5.0}/README.rst +11 -0
  3. arraykit-1.5.0/VERSION +2 -0
  4. {arraykit-1.3.1 → arraykit-1.5.0/arraykit.egg-info}/PKG-INFO +13 -2
  5. {arraykit-1.3.1 → arraykit-1.5.0}/arraykit.egg-info/SOURCES.txt +1 -0
  6. {arraykit-1.3.1 → arraykit-1.5.0}/pyproject.toml +21 -1
  7. arraykit-1.5.0/setup.py +46 -0
  8. {arraykit-1.3.1 → arraykit-1.5.0}/src/__init__.py +2 -0
  9. {arraykit-1.3.1 → arraykit-1.5.0}/src/__init__.pyi +130 -103
  10. {arraykit-1.3.1 → arraykit-1.5.0}/src/_arraykit.c +5 -0
  11. {arraykit-1.3.1 → arraykit-1.5.0}/src/methods.c +587 -0
  12. {arraykit-1.3.1 → arraykit-1.5.0}/src/methods.h +6 -0
  13. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_array_go.py +16 -38
  14. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_astype_array.py +36 -26
  15. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_auto_map.py +140 -142
  16. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_auto_map_property.py +8 -8
  17. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_block_index.py +244 -283
  18. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_delimited_to_arrays.py +507 -288
  19. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_delimited_to_arrays_integration.py +28 -7
  20. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_delimited_to_arrays_property.py +14 -14
  21. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_nonzero_1d.py +9 -27
  22. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_nonzero_1d_property.py +3 -6
  23. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_objectable.py +2 -7
  24. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_pyi.py +11 -6
  25. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_split_after_count.py +7 -13
  26. arraykit-1.5.0/test/test_transition_slices_from_group.py +224 -0
  27. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_tri_map.py +215 -89
  28. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_type_discovery.py +128 -96
  29. {arraykit-1.3.1 → arraykit-1.5.0}/test/test_util.py +394 -230
  30. arraykit-1.3.1/VERSION +0 -2
  31. arraykit-1.3.1/setup.py +0 -39
  32. {arraykit-1.3.1 → arraykit-1.5.0}/LICENSE.txt +0 -0
  33. {arraykit-1.3.1 → arraykit-1.5.0}/MANIFEST.in +0 -0
  34. {arraykit-1.3.1 → arraykit-1.5.0}/arraykit.egg-info/dependency_links.txt +0 -0
  35. {arraykit-1.3.1 → arraykit-1.5.0}/arraykit.egg-info/requires.txt +0 -0
  36. {arraykit-1.3.1 → arraykit-1.5.0}/arraykit.egg-info/top_level.txt +0 -0
  37. {arraykit-1.3.1 → arraykit-1.5.0}/setup.cfg +0 -0
  38. {arraykit-1.3.1 → arraykit-1.5.0}/src/array_go.c +0 -0
  39. {arraykit-1.3.1 → arraykit-1.5.0}/src/array_go.h +0 -0
  40. {arraykit-1.3.1 → arraykit-1.5.0}/src/array_to_tuple.c +0 -0
  41. {arraykit-1.3.1 → arraykit-1.5.0}/src/array_to_tuple.h +0 -0
  42. {arraykit-1.3.1 → arraykit-1.5.0}/src/auto_map.c +0 -0
  43. {arraykit-1.3.1 → arraykit-1.5.0}/src/auto_map.h +0 -0
  44. {arraykit-1.3.1 → arraykit-1.5.0}/src/block_index.c +0 -0
  45. {arraykit-1.3.1 → arraykit-1.5.0}/src/block_index.h +0 -0
  46. {arraykit-1.3.1 → arraykit-1.5.0}/src/delimited_to_arrays.c +0 -0
  47. {arraykit-1.3.1 → arraykit-1.5.0}/src/delimited_to_arrays.h +0 -0
  48. {arraykit-1.3.1 → arraykit-1.5.0}/src/py.typed +0 -0
  49. {arraykit-1.3.1 → arraykit-1.5.0}/src/tri_map.c +0 -0
  50. {arraykit-1.3.1 → arraykit-1.5.0}/src/tri_map.h +0 -0
  51. {arraykit-1.3.1 → arraykit-1.5.0}/src/utilities.h +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arraykit
3
- Version: 1.3.1
3
+ Version: 1.5.0
4
4
  Summary: Array utilities for StaticFrame
5
5
  Author: Christopher Ariza, Brandt Bucher, Charles Burkland
6
- License-Expression: MIT
6
+ License: MIT
7
7
  Project-URL: Homepage, https://github.com/static-frame/arraykit
8
8
  Keywords: numpy,array
9
9
  Classifier: Development Status :: 5 - Production/Stable
@@ -64,6 +64,17 @@ ArrayKit requires the following:
64
64
  What is New in ArrayKit
65
65
  -------------------------
66
66
 
67
+ 1.5.0
68
+ ............
69
+ Added ``transition_slices_from_group``.
70
+
71
+
72
+ 1.4.0
73
+ ............
74
+
75
+ Added ``write_array_to_file()``.
76
+
77
+
67
78
  1.3.1
68
79
  ............
69
80
 
@@ -35,6 +35,17 @@ ArrayKit requires the following:
35
35
  What is New in ArrayKit
36
36
  -------------------------
37
37
 
38
+ 1.5.0
39
+ ............
40
+ Added ``transition_slices_from_group``.
41
+
42
+
43
+ 1.4.0
44
+ ............
45
+
46
+ Added ``write_array_to_file()``.
47
+
48
+
38
49
  1.3.1
39
50
  ............
40
51
 
arraykit-1.5.0/VERSION ADDED
@@ -0,0 +1,2 @@
1
+ 1.5.0
2
+
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arraykit
3
- Version: 1.3.1
3
+ Version: 1.5.0
4
4
  Summary: Array utilities for StaticFrame
5
5
  Author: Christopher Ariza, Brandt Bucher, Charles Burkland
6
- License-Expression: MIT
6
+ License: MIT
7
7
  Project-URL: Homepage, https://github.com/static-frame/arraykit
8
8
  Keywords: numpy,array
9
9
  Classifier: Development Status :: 5 - Production/Stable
@@ -64,6 +64,17 @@ ArrayKit requires the following:
64
64
  What is New in ArrayKit
65
65
  -------------------------
66
66
 
67
+ 1.5.0
68
+ ............
69
+ Added ``transition_slices_from_group``.
70
+
71
+
72
+ 1.4.0
73
+ ............
74
+
75
+ Added ``write_array_to_file()``.
76
+
77
+
67
78
  1.3.1
68
79
  ............
69
80
 
@@ -41,6 +41,7 @@ test/test_nonzero_1d_property.py
41
41
  test/test_objectable.py
42
42
  test/test_pyi.py
43
43
  test/test_split_after_count.py
44
+ test/test_transition_slices_from_group.py
44
45
  test/test_tri_map.py
45
46
  test/test_type_discovery.py
46
47
  test/test_util.py
@@ -19,7 +19,7 @@ authors = [
19
19
  { name = "Brandt Bucher" },
20
20
  { name = "Charles Burkland" },
21
21
  ]
22
- license = "MIT"
22
+ license = { text = "MIT" }
23
23
  keywords = ["numpy", "array"]
24
24
  dependencies = [
25
25
  "numpy>=1.24.3",
@@ -54,3 +54,23 @@ arraykit = ["__init__.pyi", "py.typed"]
54
54
  [tool.setuptools.dynamic]
55
55
  version = { file = "VERSION" }
56
56
 
57
+ [tool.ruff]
58
+ exclude = [
59
+ ".git",
60
+ ".mypy_cache",
61
+ ".pytest_cache",
62
+ ".ruff_cache",
63
+ "build",
64
+ "dist",
65
+ ]
66
+
67
+ line-length = 90
68
+ indent-width = 4
69
+
70
+ [tool.ruff.format]
71
+ quote-style = "single"
72
+ indent-style = "space"
73
+ skip-magic-trailing-comma = false
74
+ line-ending = "auto"
75
+ docstring-code-format = true
76
+ docstring-code-line-length = "dynamic"
@@ -0,0 +1,46 @@
1
+ import typing as tp
2
+ from setuptools import setup, Extension
3
+ from setuptools.command.build_ext import build_ext
4
+ import site, os
5
+ from pathlib import Path
6
+
7
+ AK_VERSION = Path('VERSION').read_text(encoding='utf-8').strip()
8
+
9
+
10
+ def get_ext_dir(*components: tp.Iterable[str]) -> tp.Sequence[str]:
11
+ dirs = []
12
+ # Check user site-packages
13
+ user_site = site.getusersitepackages()
14
+ if user_site:
15
+ fp = os.path.join(user_site, *components)
16
+ if os.path.exists(fp):
17
+ dirs.append(fp)
18
+ # Check system site-packages
19
+ for sp in site.getsitepackages():
20
+ fp = os.path.join(sp, *components)
21
+ if os.path.exists(fp):
22
+ dirs.append(fp)
23
+ return dirs
24
+
25
+
26
+ ext_modules = [
27
+ Extension(
28
+ name='arraykit._arraykit',
29
+ sources=[
30
+ 'src/_arraykit.c',
31
+ 'src/array_go.c',
32
+ 'src/array_to_tuple.c',
33
+ 'src/block_index.c',
34
+ 'src/delimited_to_arrays.c',
35
+ 'src/methods.c',
36
+ 'src/tri_map.c',
37
+ 'src/auto_map.c',
38
+ ],
39
+ include_dirs=get_ext_dir('numpy', '_core', 'include') + ['src'],
40
+ library_dirs=get_ext_dir('numpy', '_core', 'lib'),
41
+ define_macros=[('AK_VERSION', AK_VERSION)],
42
+ libraries=['npymath'],
43
+ )
44
+ ]
45
+
46
+ setup(ext_modules=ext_modules)
@@ -24,6 +24,7 @@ from ._arraykit import delimited_to_arrays as delimited_to_arrays
24
24
  from ._arraykit import iterable_str_to_array_1d as iterable_str_to_array_1d
25
25
  from ._arraykit import split_after_count as split_after_count
26
26
  from ._arraykit import get_new_indexers_and_screen as get_new_indexers_and_screen
27
+ from ._arraykit import write_array_to_file as write_array_to_file
27
28
  from ._arraykit import count_iteration as count_iteration
28
29
  from ._arraykit import first_true_1d as first_true_1d
29
30
  from ._arraykit import first_true_2d as first_true_2d
@@ -32,6 +33,7 @@ from ._arraykit import slice_to_unit as slice_to_unit
32
33
  from ._arraykit import array_to_tuple_array as array_to_tuple_array
33
34
  from ._arraykit import array_to_tuple_iter as array_to_tuple_iter
34
35
  from ._arraykit import nonzero_1d as nonzero_1d
36
+ from ._arraykit import transition_slices_from_group as transition_slices_from_group
35
37
  from ._arraykit import is_objectable_dt64 as is_objectable_dt64
36
38
  from ._arraykit import is_objectable as is_objectable
37
39
  from ._arraykit import astype_array as astype_array
@@ -8,22 +8,22 @@ _T = tp.TypeVar('_T')
8
8
  __version__: str
9
9
 
10
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', ...],
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
27
  ]
28
28
 
29
29
  class ErrorInitTypeBlocks(RuntimeError):
@@ -31,7 +31,6 @@ class ErrorInitTypeBlocks(RuntimeError):
31
31
  def with_traceback(self, tb: Exception) -> Exception: ...
32
32
  def __setstate__(self) -> None: ...
33
33
 
34
-
35
34
  class NonUniqueError(RuntimeError):
36
35
  def __init__(self, *args: tp.Any, **kwargs: tp.Any) -> None: ...
37
36
  def with_traceback(self, tb: Exception) -> Exception: ...
@@ -62,20 +61,18 @@ class TriMap:
62
61
  def dst_no_fill(self) -> bool: ...
63
62
  def map_src_no_fill(self, /, array_from: np.ndarray) -> np.ndarray: ...
64
63
  def map_dst_no_fill(self, /, array_from: np.ndarray) -> np.ndarray: ...
65
- def map_src_fill(self, /,
66
- array_from: np.ndarray,
67
- fill_value: tp.Any,
68
- fill_value_dtype: np.dtype
69
- ) -> np.ndarray: ...
70
- def map_dst_fill(self, /,
71
- array_from: np.ndarray,
72
- fill_value: tp.Any,
73
- fill_value_dtype: np.dtype
74
- ) -> np.ndarray: ...
75
- def map_merge(self, /,
76
- array_from_src: np.ndarray,
77
- array_from_dst: np.ndarray,
78
- ) -> np.ndarray: ...
64
+ def map_src_fill(
65
+ self, /, array_from: np.ndarray, fill_value: tp.Any, fill_value_dtype: np.dtype
66
+ ) -> np.ndarray: ...
67
+ def map_dst_fill(
68
+ self, /, array_from: np.ndarray, fill_value: tp.Any, fill_value_dtype: np.dtype
69
+ ) -> np.ndarray: ...
70
+ def map_merge(
71
+ self,
72
+ /,
73
+ array_from_src: np.ndarray,
74
+ array_from_dst: np.ndarray,
75
+ ) -> np.ndarray: ...
79
76
 
80
77
  class BlockIndex:
81
78
  shape: tp.Tuple[int, int]
@@ -84,46 +81,68 @@ class BlockIndex:
84
81
  columns: int
85
82
 
86
83
  def __init__(
87
- block_count: int = 0,
88
- row_count: int = -1,
89
- bir_count: int = 0,
90
- bir_capacity: int = 8,
91
- bir_bytes: bytes = b'',
92
- dtype: np.dtype = None,
93
- ) -> None: ...
84
+ block_count: int = 0,
85
+ row_count: int = -1,
86
+ bir_count: int = 0,
87
+ bir_capacity: int = 8,
88
+ bir_bytes: bytes = b'',
89
+ dtype: np.dtype = None,
90
+ ) -> None: ...
94
91
  def register(self, __value: np.ndarray) -> bool: ...
95
- def to_list(self,) -> tp.List[tp.Tuple[int, int]]: ...
96
- def to_bytes(self,) -> bytes: ...
97
- def copy(self,) -> 'BlockIndex': ...
98
- def __len__(self,) -> int: ...
99
- def __iter__(self,) -> tp.Iterator[tp.Tuple[int, int]]: ...
100
- def __reversed__(self,) -> tp.Iterator[tp.Tuple[int, int]]: ...
92
+ def to_list(
93
+ self,
94
+ ) -> tp.List[tp.Tuple[int, int]]: ...
95
+ def to_bytes(
96
+ self,
97
+ ) -> bytes: ...
98
+ def copy(
99
+ self,
100
+ ) -> 'BlockIndex': ...
101
+ def __len__(
102
+ self,
103
+ ) -> int: ...
104
+ def __iter__(
105
+ self,
106
+ ) -> tp.Iterator[tp.Tuple[int, int]]: ...
107
+ def __reversed__(
108
+ self,
109
+ ) -> tp.Iterator[tp.Tuple[int, int]]: ...
101
110
  def __getitem__(self, __key: int) -> tp.Tuple[int, int]: ...
102
- def __getstate__(self,) -> tp.Tuple[int, int, int, int, bytes]: ...
111
+ def __getstate__(
112
+ self,
113
+ ) -> tp.Tuple[int, int, int, int, bytes]: ...
103
114
  def __setstate__(self, state: tp.Tuple[int, int, int, int, bytes]) -> None: ...
104
115
  def get_block(self, __key: int) -> int: ...
105
116
  def get_column(self, __key: int) -> int: ...
106
- def iter_select(self,
107
- __key: tp.Union[slice, np.ndarray, tp.List[int]],
108
- ) -> tp.Iterator[tp.Tuple[int, int]]: ...
109
- def iter_contiguous(self,
110
- __key: tp.Union[slice, np.ndarray, tp.List[int]],
111
- *,
112
- ascending: bool = False,
113
- reduce: bool = False,
114
- ) -> tp.Iterator[tp.Tuple[int, tp.Union[slice, int]]]: ...
117
+ def iter_select(
118
+ self,
119
+ __key: tp.Union[slice, np.ndarray, tp.List[int]],
120
+ ) -> tp.Iterator[tp.Tuple[int, int]]: ...
121
+ def iter_contiguous(
122
+ self,
123
+ __key: tp.Union[slice, np.ndarray, tp.List[int]],
124
+ *,
125
+ ascending: bool = False,
126
+ reduce: bool = False,
127
+ ) -> tp.Iterator[tp.Tuple[int, tp.Union[slice, int]]]: ...
115
128
  def iter_block(self) -> tp.Iterator[tp.Tuple[int, slice]]: ...
116
129
 
117
-
118
130
  class FrozenAutoMap:
119
- def __init__(self, labels: tp.Iterable[_TLabel] | np.ndarray = (), /,) -> None: ...
120
- def get(self, __key: _TLabel, /,) -> int: ...
131
+ def __init__(
132
+ self,
133
+ labels: tp.Iterable[_TLabel] | np.ndarray = (),
134
+ /,
135
+ ) -> None: ...
136
+ def get(
137
+ self,
138
+ __key: _TLabel,
139
+ /,
140
+ ) -> int: ...
121
141
  def keys(self) -> tp.Iterator[_TLabel]: ...
122
142
  def items(self) -> tp.Iterator[tuple[_TLabel, int]]: ...
123
143
  def values(self) -> tp.Iterator[int]: ...
124
144
  def get_all(self, __key: list[_TLabel] | np.ndarray) -> np.ndarray: ...
125
145
  def get_any(self, __key: list[_TLabel] | np.ndarray) -> list[int]: ...
126
-
127
146
  def __iter__(self) -> tp.Iterator[_TLabel]: ...
128
147
  def __getitem__(self, __key: tp.Any) -> int: ...
129
148
  def __contains__(self, __key: tp.Any) -> bool: ...
@@ -133,59 +152,54 @@ class FrozenAutoMap:
133
152
  def __getstate__(self) -> tp.Any: ...
134
153
  def __setstate__(self, __state: tp.Any) -> None: ...
135
154
  def __len__(self) -> int: ...
136
-
137
155
  def __or__(self) -> tp.Any: ...
138
156
  def __ror__(self) -> tp.Any: ...
139
157
 
140
-
141
158
  class AutoMap(FrozenAutoMap):
142
- def __init__(self, labels: tp.Iterable[_TLabel] | np.ndarray = (), /,) -> None: ...
159
+ def __init__(
160
+ self,
161
+ labels: tp.Iterable[_TLabel] | np.ndarray = (),
162
+ /,
163
+ ) -> None: ...
143
164
  def __ior__(self) -> tp.Any: ...
144
165
  def add(self, __key: _TLabel) -> None: ...
145
166
  def update(self, __keys: tp.Iterable[_TLabel] | np.ndarray) -> None: ...
146
167
 
147
-
148
-
149
-
150
168
  def iterable_str_to_array_1d(
151
- iterable: tp.Iterable[str],
152
- *,
153
- dtype: tp.Optional[tp.Any] = None,
154
- thousandschar: str = ',',
155
- decimalchar: str = '.',
156
- ) -> np.ndarray: ...
157
-
169
+ iterable: tp.Iterable[str],
170
+ *,
171
+ dtype: tp.Optional[tp.Any] = None,
172
+ thousandschar: str = ',',
173
+ decimalchar: str = '.',
174
+ ) -> np.ndarray: ...
158
175
  def delimited_to_arrays(
159
- file_like: tp.Iterable[str],
160
- *,
161
- axis: int = 0,
162
- dtypes: tp.Optional[tp.Callable[[int], tp.Any]] = None,
163
- line_select: tp.Optional[tp.Callable[[int], bool]] = None,
164
- delimiter: str = ',',
165
- doublequote: bool = True,
166
- escapechar: tp.Optional[str] = '',
167
- quotechar: tp.Optional[str] = '"',
168
- quoting: int = 0,
169
- skipinitialspace: bool = False,
170
- strict: bool = False,
171
- thousandschar: str = ',',
172
- decimalchar: str = '.',
173
- ) -> tp.List[np.array]: ...
174
-
176
+ file_like: tp.Iterable[str],
177
+ *,
178
+ axis: int = 0,
179
+ dtypes: tp.Optional[tp.Callable[[int], tp.Any]] = None,
180
+ line_select: tp.Optional[tp.Callable[[int], bool]] = None,
181
+ delimiter: str = ',',
182
+ doublequote: bool = True,
183
+ escapechar: tp.Optional[str] = '',
184
+ quotechar: tp.Optional[str] = '"',
185
+ quoting: int = 0,
186
+ skipinitialspace: bool = False,
187
+ strict: bool = False,
188
+ thousandschar: str = ',',
189
+ decimalchar: str = '.',
190
+ ) -> tp.List[np.array]: ...
175
191
  def split_after_count(
176
- string: str,
177
- *,
178
- delimiter: str = ',',
179
- count: int = 0,
180
- doublequote: bool = True,
181
- escapechar: tp.Optional[str] = '',
182
- quotechar: tp.Optional[str] = '"',
183
- quoting: int = 0,
184
- strict: bool = False,
185
- ) -> tp.Tuple[str, str]: ...
186
-
192
+ string: str,
193
+ *,
194
+ delimiter: str = ',',
195
+ count: int = 0,
196
+ doublequote: bool = True,
197
+ escapechar: tp.Optional[str] = '',
198
+ quotechar: tp.Optional[str] = '"',
199
+ quoting: int = 0,
200
+ strict: bool = False,
201
+ ) -> tp.Tuple[str, str]: ...
187
202
  def count_iteration(__iterable: tp.Iterable) -> int: ...
188
-
189
203
  def immutable_filter(__array: np.ndarray) -> np.ndarray: ...
190
204
  def mloc(__array: np.ndarray) -> int: ...
191
205
  def name_filter(__name: _TLabel) -> _TLabel: ...
@@ -193,20 +207,33 @@ def shape_filter(__array: np.ndarray) -> np.ndarray: ...
193
207
  def column_2d_filter(__array: np.ndarray) -> np.ndarray: ...
194
208
  def column_1d_filter(__array: np.ndarray) -> np.ndarray: ...
195
209
  def row_1d_filter(__array: np.ndarray) -> np.ndarray: ...
196
- def array_deepcopy(__array: np.ndarray, memo: tp.Optional[tp.Dict[int, tp.Any]]) -> np.ndarray: ...
210
+ def array_deepcopy(
211
+ __array: np.ndarray, memo: tp.Optional[tp.Dict[int, tp.Any]]
212
+ ) -> np.ndarray: ...
197
213
  def resolve_dtype(__d1: np.dtype, __d2: np.dtype) -> np.dtype: ...
198
214
  def resolve_dtype_iter(__dtypes: tp.Iterable[np.dtype]) -> np.dtype: ...
199
215
  def isna_element(__value: tp.Any, include_none: bool = True) -> bool: ...
200
216
  def dtype_from_element(__value: tp.Optional[_TLabel]) -> np.dtype: ...
201
- def get_new_indexers_and_screen(indexers: np.ndarray, positions: np.ndarray) -> tp.Tuple[np.ndarray, np.ndarray]: ...
202
-
217
+ def get_new_indexers_and_screen(
218
+ indexers: np.ndarray, positions: np.ndarray
219
+ ) -> tp.Tuple[np.ndarray, np.ndarray]: ...
220
+ def write_array_to_file(
221
+ __array: np.ndarray,
222
+ __file: tp.IO[bytes],
223
+ *,
224
+ fortran_order: bool = False,
225
+ buffersize: int = 8192,
226
+ ) -> None: ...
203
227
  def first_true_1d(__array: np.ndarray, *, forward: bool) -> int: ...
204
228
  def first_true_2d(__array: np.ndarray, *, forward: bool, axis: int) -> np.ndarray: ...
205
229
  def nonzero_1d(__array: np.ndarray, /) -> np.ndarray: ...
230
+ def transition_slices_from_group(
231
+ __group: np.ndarray, /
232
+ ) -> tp.Tuple[tp.Iterator[slice], bool]: ...
206
233
  def is_objectable_dt64(__array: np.ndarray, /) -> bool: ...
207
234
  def is_objectable(__array: np.ndarray, /) -> bool: ...
208
235
  def astype_array(__array: np.ndarray, __dtype: np.dtype | None, /) -> np.ndarray: ...
209
236
  def slice_to_ascending_slice(__slice: slice, __size: int) -> slice: ...
210
237
  def slice_to_unit(__slice: slice, /) -> int: ...
211
238
  def array_to_tuple_array(__array: np.ndarray) -> np.ndarray: ...
212
- def array_to_tuple_iter(__array: np.ndarray) -> tp.Iterator[tp.Tuple[tp.Any, ...]]: ...
239
+ def array_to_tuple_iter(__array: np.ndarray) -> tp.Iterator[tp.Tuple[tp.Any, ...]]: ...
@@ -53,6 +53,7 @@ static PyMethodDef arraykit_methods[] = {
53
53
  NULL},
54
54
  {"count_iteration", count_iteration, METH_O, NULL},
55
55
  {"nonzero_1d", nonzero_1d, METH_O, NULL},
56
+ {"transition_slices_from_group", transition_slices_from_group, METH_O, NULL},
56
57
  {"is_objectable_dt64", is_objectable_dt64, METH_O, NULL},
57
58
  {"is_objectable", is_objectable, METH_O, NULL},
58
59
  {"astype_array", astype_array, METH_VARARGS, NULL},
@@ -65,6 +66,10 @@ static PyMethodDef arraykit_methods[] = {
65
66
  (PyCFunction)get_new_indexers_and_screen,
66
67
  METH_VARARGS | METH_KEYWORDS,
67
68
  NULL},
69
+ {"write_array_to_file",
70
+ (PyCFunction)write_array_to_file,
71
+ METH_VARARGS | METH_KEYWORDS,
72
+ NULL},
68
73
  {NULL},
69
74
  };
70
75