arraykit 0.10.0__tar.gz → 1.0.7__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 (45) hide show
  1. {arraykit-0.10.0/arraykit.egg-info → arraykit-1.0.7}/PKG-INFO +16 -5
  2. {arraykit-0.10.0 → arraykit-1.0.7}/README.rst +52 -4
  3. {arraykit-0.10.0 → arraykit-1.0.7/arraykit.egg-info}/PKG-INFO +16 -5
  4. {arraykit-0.10.0 → arraykit-1.0.7}/arraykit.egg-info/SOURCES.txt +4 -0
  5. arraykit-1.0.7/arraykit.egg-info/requires.txt +1 -0
  6. {arraykit-0.10.0 → arraykit-1.0.7}/setup.py +5 -5
  7. {arraykit-0.10.0 → arraykit-1.0.7}/src/__init__.py +4 -0
  8. {arraykit-0.10.0 → arraykit-1.0.7}/src/__init__.pyi +33 -0
  9. {arraykit-0.10.0 → arraykit-1.0.7}/src/_arraykit.c +19 -2
  10. arraykit-1.0.7/src/auto_map.c +2655 -0
  11. arraykit-1.0.7/src/auto_map.h +14 -0
  12. arraykit-1.0.7/test/test_auto_map.py +994 -0
  13. arraykit-1.0.7/test/test_auto_map_property.py +283 -0
  14. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_pyi.py +13 -2
  15. arraykit-0.10.0/arraykit.egg-info/requires.txt +0 -1
  16. {arraykit-0.10.0 → arraykit-1.0.7}/LICENSE.txt +0 -0
  17. {arraykit-0.10.0 → arraykit-1.0.7}/MANIFEST.in +0 -0
  18. {arraykit-0.10.0 → arraykit-1.0.7}/arraykit.egg-info/dependency_links.txt +0 -0
  19. {arraykit-0.10.0 → arraykit-1.0.7}/arraykit.egg-info/top_level.txt +0 -0
  20. {arraykit-0.10.0 → arraykit-1.0.7}/setup.cfg +0 -0
  21. {arraykit-0.10.0 → arraykit-1.0.7}/src/array_go.c +0 -0
  22. {arraykit-0.10.0 → arraykit-1.0.7}/src/array_go.h +0 -0
  23. {arraykit-0.10.0 → arraykit-1.0.7}/src/array_to_tuple.c +0 -0
  24. {arraykit-0.10.0 → arraykit-1.0.7}/src/array_to_tuple.h +0 -0
  25. {arraykit-0.10.0 → arraykit-1.0.7}/src/block_index.c +0 -0
  26. {arraykit-0.10.0 → arraykit-1.0.7}/src/block_index.h +0 -0
  27. {arraykit-0.10.0 → arraykit-1.0.7}/src/delimited_to_arrays.c +0 -0
  28. {arraykit-0.10.0 → arraykit-1.0.7}/src/delimited_to_arrays.h +0 -0
  29. {arraykit-0.10.0 → arraykit-1.0.7}/src/methods.c +0 -0
  30. {arraykit-0.10.0 → arraykit-1.0.7}/src/methods.h +0 -0
  31. {arraykit-0.10.0 → arraykit-1.0.7}/src/py.typed +0 -0
  32. {arraykit-0.10.0 → arraykit-1.0.7}/src/tri_map.c +0 -0
  33. {arraykit-0.10.0 → arraykit-1.0.7}/src/tri_map.h +0 -0
  34. {arraykit-0.10.0 → arraykit-1.0.7}/src/utilities.h +0 -0
  35. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_array_go.py +0 -0
  36. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_block_index.py +0 -0
  37. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_delimited_to_arrays.py +0 -0
  38. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_delimited_to_arrays_integration.py +0 -0
  39. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_delimited_to_arrays_property.py +0 -0
  40. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_nonzero_1d.py +0 -0
  41. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_nonzero_1d_property.py +0 -0
  42. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_split_after_count.py +0 -0
  43. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_tri_map.py +0 -0
  44. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_type_discovery.py +0 -0
  45. {arraykit-0.10.0 → arraykit-1.0.7}/test/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: arraykit
3
- Version: 0.10.0
3
+ Version: 1.0.7
4
4
  Summary: Array utilities for StaticFrame
5
5
  Home-page: https://github.com/static-frame/arraykit
6
6
  Author: Christopher Ariza, Brandt Bucher, Charles Burkland
@@ -15,15 +15,26 @@ Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: MacOS :: MacOS X
16
16
  Classifier: Operating System :: Microsoft :: Windows
17
17
  Classifier: Operating System :: POSIX
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
22
21
  Classifier: Programming Language :: Python :: 3.13
23
22
  Classifier: Typing :: Typed
24
- Requires-Python: >=3.9
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/plain
25
25
  License-File: LICENSE.txt
26
- Requires-Dist: numpy>=1.19.5
26
+ Requires-Dist: numpy>=1.24.3
27
+ Dynamic: author
28
+ Dynamic: classifier
29
+ Dynamic: description
30
+ Dynamic: description-content-type
31
+ Dynamic: home-page
32
+ Dynamic: keywords
33
+ Dynamic: license
34
+ Dynamic: license-file
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
27
38
 
28
39
  The ArrayKit library provides utilities for creating and transforming NumPy arrays, implementing performance-critical StaticFrame operations as Python C extensions.
29
40
 
@@ -23,20 +23,68 @@ Code: https://github.com/InvestmentSystems/arraykit
23
23
  Packages: https://pypi.org/project/arraykit
24
24
 
25
25
 
26
-
27
26
  Dependencies
28
27
  --------------
29
28
 
30
29
  ArrayKit requires the following:
31
30
 
32
- - Python>=3.9
33
- - numpy>=1.19.5
34
-
31
+ - Python>=3.10
32
+ - numpy>=1.24.3
35
33
 
36
34
 
37
35
  What is New in ArrayKit
38
36
  -------------------------
39
37
 
38
+ 1.0.7
39
+ ............
40
+
41
+ Updated build configuration.
42
+
43
+
44
+ 1.0.6
45
+ ............
46
+
47
+ Updated build configuration.
48
+
49
+
50
+ 1.0.5
51
+ ............
52
+
53
+ Updated build configuration.
54
+
55
+
56
+ 1.0.4
57
+ ............
58
+
59
+ Updated build configuration.
60
+
61
+
62
+ 1.0.3
63
+ ............
64
+
65
+ Updated build configuration.
66
+
67
+
68
+ 1.0.2
69
+ ............
70
+
71
+ Updated build configuration.
72
+
73
+
74
+ 1.0.1
75
+ ............
76
+
77
+ Updated build configuration.
78
+
79
+
80
+ 1.0.0
81
+ ............
82
+
83
+ Integrated `AutoMap` and `FrozenAutoMap` from `arraymap`.
84
+
85
+ Removed global integer cache from `AutoMap` and `FrozenAutoMap` for thread safety.
86
+
87
+
40
88
  0.10.0
41
89
  ............
42
90
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: arraykit
3
- Version: 0.10.0
3
+ Version: 1.0.7
4
4
  Summary: Array utilities for StaticFrame
5
5
  Home-page: https://github.com/static-frame/arraykit
6
6
  Author: Christopher Ariza, Brandt Bucher, Charles Burkland
@@ -15,15 +15,26 @@ Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: MacOS :: MacOS X
16
16
  Classifier: Operating System :: Microsoft :: Windows
17
17
  Classifier: Operating System :: POSIX
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
22
21
  Classifier: Programming Language :: Python :: 3.13
23
22
  Classifier: Typing :: Typed
24
- Requires-Python: >=3.9
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/plain
25
25
  License-File: LICENSE.txt
26
- Requires-Dist: numpy>=1.19.5
26
+ Requires-Dist: numpy>=1.24.3
27
+ Dynamic: author
28
+ Dynamic: classifier
29
+ Dynamic: description
30
+ Dynamic: description-content-type
31
+ Dynamic: home-page
32
+ Dynamic: keywords
33
+ Dynamic: license
34
+ Dynamic: license-file
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
27
38
 
28
39
  The ArrayKit library provides utilities for creating and transforming NumPy arrays, implementing performance-critical StaticFrame operations as Python C extensions.
29
40
 
@@ -14,6 +14,8 @@ src/array_go.c
14
14
  src/array_go.h
15
15
  src/array_to_tuple.c
16
16
  src/array_to_tuple.h
17
+ src/auto_map.c
18
+ src/auto_map.h
17
19
  src/block_index.c
18
20
  src/block_index.h
19
21
  src/delimited_to_arrays.c
@@ -25,6 +27,8 @@ src/tri_map.c
25
27
  src/tri_map.h
26
28
  src/utilities.h
27
29
  test/test_array_go.py
30
+ test/test_auto_map.py
31
+ test/test_auto_map_property.py
28
32
  test/test_block_index.py
29
33
  test/test_delimited_to_arrays.py
30
34
  test/test_delimited_to_arrays_integration.py
@@ -0,0 +1 @@
1
+ numpy>=1.24.3
@@ -3,9 +3,8 @@ import os
3
3
  import typing as tp
4
4
  from setuptools import Extension # type: ignore
5
5
  from setuptools import setup
6
- from pathlib import Path
7
6
 
8
- AK_VERSION = '0.10.0'
7
+ AK_VERSION = '1.0.7'
9
8
 
10
9
  def get_long_description() -> str:
11
10
  return '''The ArrayKit library provides utilities for creating and transforming NumPy arrays, implementing performance-critical StaticFrame operations as Python C extensions.
@@ -40,6 +39,7 @@ ak_extension = Extension(
40
39
  'src/delimited_to_arrays.c',
41
40
  'src/methods.c',
42
41
  'src/tri_map.c',
42
+ 'src/auto_map.c',
43
43
  ],
44
44
  include_dirs=get_ext_dir('numpy', '_core', 'include') + ['src'],
45
45
  library_dirs=get_ext_dir('numpy', '_core', 'lib'),
@@ -52,8 +52,9 @@ setup(
52
52
  version=AK_VERSION,
53
53
  description='Array utilities for StaticFrame',
54
54
  long_description=get_long_description(),
55
- python_requires='>=3.9',
56
- install_requires=['numpy>=1.19.5'],
55
+ long_description_content_type='text/plain', # use text/x-rst
56
+ python_requires='>=3.10',
57
+ install_requires=['numpy>=1.24.3'],
57
58
  url='https://github.com/static-frame/arraykit',
58
59
  author='Christopher Ariza, Brandt Bucher, Charles Burkland',
59
60
  license='MIT',
@@ -68,7 +69,6 @@ setup(
68
69
  'Operating System :: MacOS :: MacOS X',
69
70
  'Operating System :: Microsoft :: Windows',
70
71
  'Operating System :: POSIX',
71
- 'Programming Language :: Python :: 3.9',
72
72
  'Programming Language :: Python :: 3.10',
73
73
  'Programming Language :: Python :: 3.11',
74
74
  'Programming Language :: Python :: 3.12',
@@ -31,3 +31,7 @@ from ._arraykit import slice_to_ascending_slice as slice_to_ascending_slice
31
31
  from ._arraykit import array_to_tuple_array as array_to_tuple_array
32
32
  from ._arraykit import array_to_tuple_iter as array_to_tuple_iter
33
33
  from ._arraykit import nonzero_1d as nonzero_1d
34
+
35
+ from ._arraykit import AutoMap as AutoMap
36
+ from ._arraykit import FrozenAutoMap as FrozenAutoMap
37
+ from ._arraykit import NonUniqueError as NonUniqueError
@@ -108,6 +108,39 @@ class BlockIndex:
108
108
  ) -> tp.Iterator[tp.Tuple[int, tp.Union[slice, int]]]: ...
109
109
  def iter_block(self) -> tp.Iterator[tp.Tuple[int, slice]]: ...
110
110
 
111
+
112
+ class FrozenAutoMap:
113
+ def __init__(self, labels: tp.Iterable[_TLabel] | np.ndarray, /,) -> None: ...
114
+ def get(self, __key: _TLabel, /,) -> int: ...
115
+ def keys(self) -> tp.Iterator[_TLabel]: ...
116
+ def items(self) -> tp.Iterator[tuple[_TLabel, int]]: ...
117
+ def values(self) -> tp.Iterator[int]: ...
118
+ def get_all(self, __key: list[_TLabel] | np.ndarray) -> np.ndarray: ...
119
+ def get_any(self, __key: list[_TLabel] | np.ndarray) -> list[int]: ...
120
+
121
+ def __iter__(self) -> tp.Iterator[_TLabel]: ...
122
+ def __getitem__(self, __key: tp.Any) -> int: ...
123
+ def __contains__(self, __key: tp.Any) -> bool: ...
124
+ def __getnewargs__(self) -> tp.Any: ...
125
+ def __reversed__(self) -> tp.Any: ...
126
+ def __sizeof__(self) -> int: ...
127
+ def __getstate__(self) -> tp.Any: ...
128
+ def __setstate__(self, __state: tp.Any) -> None: ...
129
+ def __len__(self) -> int: ...
130
+
131
+ def __or__(self) -> tp.Any: ...
132
+ def __ror__(self) -> tp.Any: ...
133
+
134
+
135
+ class AutoMap(FrozenAutoMap):
136
+ def __init__(self, labels: tp.Iterable[_TLabel] | np.ndarray, /,) -> None: ...
137
+ def __ior__(self) -> tp.Any: ...
138
+ def add(self, __key: int) -> None: ...
139
+ def update(self, __keys: tp.Iterable[_TLabel] | np.ndarray) -> None: ...
140
+
141
+
142
+
143
+
111
144
  def iterable_str_to_array_1d(
112
145
  iterable: tp.Iterable[str],
113
146
  *,
@@ -11,6 +11,7 @@
11
11
  # include "delimited_to_arrays.h"
12
12
  # include "methods.h"
13
13
  # include "tri_map.h"
14
+ # include "auto_map.h"
14
15
 
15
16
  static PyMethodDef arraykit_methods[] = {
16
17
  {"immutable_filter", immutable_filter, METH_O, NULL},
@@ -85,6 +86,15 @@ PyInit__arraykit(void)
85
86
  return NULL;
86
87
  }
87
88
 
89
+ NonUniqueError = PyErr_NewExceptionWithDoc(
90
+ "arraykit.NonUniqueError",
91
+ "ValueError for non-unique values.",
92
+ PyExc_ValueError,
93
+ NULL);
94
+ if (NonUniqueError == NULL) {
95
+ return NULL;
96
+ }
97
+
88
98
  PyObject *copy = PyImport_ImportModule("copy");
89
99
  if (copy == NULL) {
90
100
  return NULL;
@@ -107,12 +117,19 @@ PyInit__arraykit(void)
107
117
  PyType_Ready(&BIIterBlockType) ||
108
118
  PyType_Ready(&TriMapType) ||
109
119
  PyType_Ready(&ArrayGOType) ||
120
+ PyType_Ready(&AMType) ||
121
+ PyType_Ready(&FAMIType) ||
122
+ PyType_Ready(&FAMVType) ||
123
+ PyType_Ready(&FAMType) ||
110
124
  PyModule_AddObject(m, "BlockIndex", (PyObject *) &BlockIndexType) ||
111
125
  PyModule_AddObject(m, "TriMap", (PyObject *) &TriMapType) ||
112
126
  PyModule_AddObject(m, "ArrayGO", (PyObject *) &ArrayGOType) ||
113
127
  PyModule_AddObject(m, "deepcopy", deepcopy) ||
114
- PyModule_AddObject(m, "ErrorInitTypeBlocks", ErrorInitTypeBlocks)
115
- ){
128
+ PyModule_AddObject(m, "ErrorInitTypeBlocks", ErrorInitTypeBlocks) ||
129
+ PyModule_AddObject(m, "AutoMap", (PyObject *)&AMType) ||
130
+ PyModule_AddObject(m, "FrozenAutoMap", (PyObject *)&FAMType) ||
131
+ PyModule_AddObject(m, "NonUniqueError", NonUniqueError)
132
+ ){
116
133
  Py_DECREF(deepcopy);
117
134
  Py_XDECREF(m);
118
135
  return NULL;