pythonic-fp-numpy 0.1.1__py3-none-any.whl → 1.0.0__py3-none-any.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.
- pythonic_fp/numpy/__init__.py +7 -14
- pythonic_fp/numpy/__init__.pyi +0 -0
- pythonic_fp/numpy/hashable_wrapped_ndarray.py +239 -52
- pythonic_fp/numpy/hashable_wrapped_ndarray.pyi +48 -0
- {pythonic_fp_numpy-0.1.1.dist-info → pythonic_fp_numpy-1.0.0.dist-info}/METADATA +14 -14
- pythonic_fp_numpy-1.0.0.dist-info/RECORD +9 -0
- pythonic_fp_numpy-0.1.1.dist-info/RECORD +0 -7
- {pythonic_fp_numpy-0.1.1.dist-info → pythonic_fp_numpy-1.0.0.dist-info}/WHEEL +0 -0
- {pythonic_fp_numpy-0.1.1.dist-info → pythonic_fp_numpy-1.0.0.dist-info}/licenses/LICENSE +0 -0
pythonic_fp/numpy/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2024-
|
|
1
|
+
# Copyright 2024-2026 Geoffrey R. Scheller
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -13,24 +13,17 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
NumPy Tools
|
|
17
|
+
-----------
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
.. admonition:: Functional Tools for Numpy
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Package implementing functional programming tools for NumPy.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
-------
|
|
25
|
-
|
|
26
|
-
+-------------------------------------------+-------------------------------------------+
|
|
27
|
-
| Module | Description |
|
|
28
|
-
+===========================================+===========================================+
|
|
29
|
-
| **pythonic_fp_hashable_wrapped_ndarray** | Variable storage capacity circular array. |
|
|
30
|
-
+-------------------------------------------+-------------------------------------------+
|
|
23
|
+
- module **hashable_wrapped_ndarray:** Wrap a non-writable NDArray making result hashable.
|
|
31
24
|
|
|
32
25
|
"""
|
|
33
26
|
|
|
34
27
|
__author__ = 'Geoffrey R. Scheller'
|
|
35
|
-
__copyright__ = 'Copyright (c) 2023-
|
|
28
|
+
__copyright__ = 'Copyright (c) 2023-2026 Geoffrey R. Scheller'
|
|
36
29
|
__license__ = 'Apache License 2.0'
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2025 Geoffrey R. Scheller
|
|
1
|
+
# Copyright 2025-2026 Geoffrey R. Scheller
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -32,13 +32,26 @@ __all__ = [
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class DTypes(Enum):
|
|
35
|
-
"""
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
"""
|
|
36
|
+
.. admonition:: Enumeration of closed NumPy datatypes
|
|
37
|
+
|
|
38
|
+
Groups (Unions) of NumPy datatypes closed to NumPy operations.
|
|
39
|
+
|
|
40
|
+
- number
|
|
41
|
+
- str\\_
|
|
42
|
+
- bytes
|
|
43
|
+
- datetime64
|
|
44
|
+
- timedelta64
|
|
45
|
+
- bool\\_
|
|
46
|
+
- void
|
|
47
|
+
- object\\_
|
|
48
|
+
|
|
49
|
+
While NumPy types are extensively covariant, the NumPy
|
|
50
|
+
C internals are somewhat invariant. NumPy also suffers
|
|
51
|
+
from what I call "Fortran Disease", types get "auto-promoted"
|
|
52
|
+
to compatible "wider types" when necessary. That is fine when
|
|
53
|
+
dealing with operators on mixed types, but NumPy will
|
|
54
|
+
auto-promote with operations on the same type.
|
|
42
55
|
|
|
43
56
|
"""
|
|
44
57
|
|
|
@@ -65,6 +78,12 @@ class HWrapNDArray(ABC):
|
|
|
65
78
|
__slots__ = '_ndarray', '_type', '_shape', '_hash'
|
|
66
79
|
|
|
67
80
|
def __init__(self, ndarray: npt.NDArray[np.generic]) -> None:
|
|
81
|
+
"""
|
|
82
|
+
.. admonition:: init
|
|
83
|
+
|
|
84
|
+
Base class for a hashable wrapped ndarray.
|
|
85
|
+
|
|
86
|
+
"""
|
|
68
87
|
self._ndarray = np.array(ndarray, copy=True)
|
|
69
88
|
self._ndarray.setflags(write=False)
|
|
70
89
|
|
|
@@ -75,16 +94,16 @@ class HWrapNDArray(ABC):
|
|
|
75
94
|
self._type = DTypes.str_
|
|
76
95
|
elif issubclass(dtype, np.bytes_):
|
|
77
96
|
self._type = DTypes.bytes
|
|
78
|
-
elif issubclass(dtype, np.void):
|
|
79
|
-
self._type = DTypes.void
|
|
80
|
-
elif issubclass(dtype, np.object_):
|
|
81
|
-
self._type = DTypes.object_
|
|
82
97
|
elif issubclass(dtype, np.datetime64):
|
|
83
98
|
self._type = DTypes.datetime64
|
|
84
99
|
elif issubclass(dtype, np.timedelta64):
|
|
85
100
|
self._type = DTypes.timedelta64
|
|
86
101
|
elif issubclass(dtype, np.bool_):
|
|
87
102
|
self._type = DTypes.bool_
|
|
103
|
+
elif issubclass(dtype, np.void):
|
|
104
|
+
self._type = DTypes.void
|
|
105
|
+
elif issubclass(dtype, np.object_):
|
|
106
|
+
self._type = DTypes.object_
|
|
88
107
|
else:
|
|
89
108
|
msg = f"HWrapNDArray: Unknow np.dtype '{dtype}'"
|
|
90
109
|
raise TypeError(msg)
|
|
@@ -92,133 +111,301 @@ class HWrapNDArray(ABC):
|
|
|
92
111
|
self._shape = self._ndarray.shape
|
|
93
112
|
self._hash = hash((self._ndarray.tobytes(), hash((self._shape, self._type))))
|
|
94
113
|
|
|
95
|
-
@abstractmethod
|
|
96
|
-
def __repr__(self) -> str: ...
|
|
97
|
-
|
|
98
114
|
def __call__(self) -> npt.NDArray[np.number]:
|
|
99
|
-
"""
|
|
115
|
+
"""
|
|
116
|
+
.. admonition:: call
|
|
100
117
|
|
|
101
|
-
|
|
118
|
+
Return a reference to the stored NDArray.
|
|
102
119
|
|
|
103
|
-
|
|
104
|
-
wrapped NDArray.
|
|
120
|
+
.. warning::
|
|
105
121
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- Never make the underlying NDArray writable!!!
|
|
122
|
+
For efficiency this method returns a reference to the
|
|
123
|
+
wrapped NDArray, not a copy.
|
|
109
124
|
|
|
110
|
-
|
|
125
|
+
- Allows for faster slicing and faster operations.
|
|
126
|
+
- Use the copy method if you want a read-write copy.
|
|
127
|
+
- Never make the underlying NDArray writable!!!
|
|
128
|
+
|
|
129
|
+
"""
|
|
111
130
|
return np.array(self._ndarray)
|
|
112
131
|
|
|
113
132
|
def __hash__(self) -> int:
|
|
133
|
+
"""
|
|
134
|
+
.. admonition:: hash
|
|
135
|
+
|
|
136
|
+
Return hash created during initialization. Hash only
|
|
137
|
+
remains valid if NDArray's flag remains off.
|
|
138
|
+
|
|
139
|
+
"""
|
|
114
140
|
return self._hash
|
|
115
141
|
|
|
116
142
|
def __eq__(self, other: object) -> bool:
|
|
117
|
-
|
|
143
|
+
"""
|
|
144
|
+
.. admonition:: equality comparison
|
|
145
|
+
|
|
146
|
+
:param other: The ``object`` being compared to ``self``.
|
|
147
|
+
:returns: ``True`` if ``object`` is another ``HWrapNDArray``
|
|
148
|
+
all whose corresponding components are equal to
|
|
149
|
+
the ones in ``self``.
|
|
150
|
+
|
|
151
|
+
"""
|
|
152
|
+
if not isinstance(other, type(self)):
|
|
118
153
|
return False
|
|
119
154
|
if self._shape != other._shape or self._type != other._type:
|
|
120
155
|
return False
|
|
121
156
|
return np.array_equal(self._ndarray, other._ndarray)
|
|
122
157
|
|
|
158
|
+
def _ndarray_repr(self) -> str:
|
|
159
|
+
ndarray = self._ndarray
|
|
160
|
+
repr_str = repr(ndarray)
|
|
161
|
+
repr_str = 'np.' + repr_str.replace('\n', '')
|
|
162
|
+
repr_str = repr_str.replace(' ', '')
|
|
163
|
+
repr_str = repr_str.replace('=', "=np.")
|
|
164
|
+
return repr_str
|
|
165
|
+
|
|
166
|
+
@abstractmethod
|
|
167
|
+
def __repr__(self) -> str: ...
|
|
168
|
+
|
|
123
169
|
def __str__(self) -> str:
|
|
124
|
-
|
|
125
|
-
|
|
170
|
+
"""
|
|
171
|
+
.. admonition:: user string
|
|
172
|
+
|
|
173
|
+
:returns: String meaningful to an end user.
|
|
126
174
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
175
|
+
"""
|
|
176
|
+
user_str = str(self._ndarray)
|
|
177
|
+
user_str = user_str.replace('\n ', '\n ')
|
|
178
|
+
user_str = '<< ' + user_str + ' >>'
|
|
179
|
+
return user_str
|
|
130
180
|
|
|
131
181
|
def copy(self) -> npt.NDArray[np.number]:
|
|
132
|
-
"""
|
|
182
|
+
"""
|
|
183
|
+
.. admonition:: copy
|
|
184
|
+
|
|
185
|
+
Return a copy of the wrapped NDArray.
|
|
186
|
+
|
|
187
|
+
"""
|
|
133
188
|
return np.array(self._ndarray, copy=True)
|
|
134
189
|
|
|
135
190
|
|
|
136
191
|
class HWrapNDArrayNumber(HWrapNDArray):
|
|
137
|
-
"""
|
|
192
|
+
"""
|
|
193
|
+
.. admonition:: wrapped numeric ndarray
|
|
138
194
|
|
|
195
|
+
Class for a hashable wrapped numeric ndarray.
|
|
196
|
+
|
|
197
|
+
"""
|
|
139
198
|
def __init__(self, ndarray: npt.NDArray[np.number]) -> None:
|
|
199
|
+
"""
|
|
200
|
+
.. admonition:: init
|
|
201
|
+
|
|
202
|
+
Wrap NDArray of arbitrary NumPy numeric types.
|
|
203
|
+
|
|
204
|
+
"""
|
|
140
205
|
super().__init__(ndarray)
|
|
141
206
|
|
|
142
207
|
def __repr__(self) -> str:
|
|
143
|
-
|
|
208
|
+
"""
|
|
209
|
+
.. admonition:: repr string
|
|
210
|
+
|
|
211
|
+
:returns: String to reproduce the wrapped numeric ndarray.
|
|
212
|
+
|
|
213
|
+
"""
|
|
214
|
+
return 'HWrapNDArrayNumber(' + self._ndarray_repr() + ')'
|
|
144
215
|
|
|
145
216
|
|
|
146
217
|
class HWrapNDArrayString(HWrapNDArray):
|
|
147
|
-
"""
|
|
218
|
+
"""
|
|
219
|
+
.. admonition:: wrapped string ndarray
|
|
220
|
+
|
|
221
|
+
Class for a hashable wrapped string ndarray.
|
|
148
222
|
|
|
223
|
+
"""
|
|
149
224
|
def __init__(self, ndarray: npt.NDArray[np.str_]) -> None:
|
|
225
|
+
"""
|
|
226
|
+
.. admonition:: init
|
|
227
|
+
|
|
228
|
+
Wrap NDArray of Unicode strings.
|
|
229
|
+
|
|
230
|
+
"""
|
|
150
231
|
super().__init__(ndarray)
|
|
151
232
|
|
|
152
233
|
def __repr__(self) -> str:
|
|
153
|
-
|
|
234
|
+
"""
|
|
235
|
+
.. admonition:: repr string
|
|
236
|
+
|
|
237
|
+
:returns: String to reproduce the wrapped string ndarray.
|
|
238
|
+
|
|
239
|
+
"""
|
|
240
|
+
return 'HWrapNDArrayStr(' + self._ndarray_repr() + ')'
|
|
154
241
|
|
|
155
242
|
|
|
156
243
|
class HWrapNDArrayBytes(HWrapNDArray):
|
|
157
|
-
"""
|
|
244
|
+
"""
|
|
245
|
+
.. admonition:: wrapped byte ndarray
|
|
246
|
+
|
|
247
|
+
Class for a hashable wrapped null-terminated
|
|
248
|
+
byte sequence ndarray.
|
|
158
249
|
|
|
250
|
+
"""
|
|
159
251
|
def __init__(self, ndarray: npt.NDArray[np.bytes_]) -> None:
|
|
252
|
+
"""
|
|
253
|
+
.. admonition:: init
|
|
254
|
+
|
|
255
|
+
Wrap NDArray of null-terminated byte sequences.
|
|
256
|
+
|
|
257
|
+
"""
|
|
160
258
|
super().__init__(ndarray)
|
|
161
259
|
|
|
162
260
|
def __repr__(self) -> str:
|
|
163
|
-
|
|
261
|
+
"""
|
|
262
|
+
.. admonition:: repr string
|
|
263
|
+
|
|
264
|
+
:returns: String to reproduce the wrapped null-terminated
|
|
265
|
+
byte sequence ndarray.
|
|
266
|
+
|
|
267
|
+
"""
|
|
268
|
+
return 'HWrapNDArrayBytes(' + self._ndarray_repr() + ')'
|
|
164
269
|
|
|
165
270
|
|
|
166
271
|
class HWrapNDArrayVoid(HWrapNDArray):
|
|
167
|
-
"""
|
|
272
|
+
"""
|
|
273
|
+
.. admonition:: wrapped void ndarray
|
|
168
274
|
|
|
275
|
+
Class for a hashable wrapped arbitrary byte
|
|
276
|
+
sequence ndarray.
|
|
277
|
+
|
|
278
|
+
"""
|
|
169
279
|
def __init__(self, ndarray: npt.NDArray[np.void]) -> None:
|
|
280
|
+
"""
|
|
281
|
+
.. admonition:: init
|
|
282
|
+
|
|
283
|
+
Wrap NDArray of arbitrary byte sequences.
|
|
284
|
+
|
|
285
|
+
"""
|
|
170
286
|
super().__init__(ndarray)
|
|
171
287
|
|
|
172
288
|
def __repr__(self) -> str:
|
|
173
|
-
|
|
289
|
+
"""
|
|
290
|
+
.. admonition:: repr string
|
|
291
|
+
|
|
292
|
+
:returns: String to reproduce the wrapped arbitrary
|
|
293
|
+
byte sequence ndarray.
|
|
294
|
+
|
|
295
|
+
"""
|
|
296
|
+
return 'HWrapNDArrayVoid(' + self._ndarray_repr() + ')'
|
|
174
297
|
|
|
175
298
|
|
|
176
299
|
class HWrapNDArrayObject(HWrapNDArray):
|
|
177
|
-
"""
|
|
300
|
+
"""
|
|
301
|
+
.. admonition:: wrapped object reference ndarray
|
|
302
|
+
|
|
303
|
+
Class for a hashable wrapped object reference ndarray.
|
|
178
304
|
|
|
305
|
+
"""
|
|
179
306
|
def __init__(self, ndarray: npt.NDArray[np.object_]) -> None:
|
|
307
|
+
"""
|
|
308
|
+
.. admonition:: init
|
|
309
|
+
|
|
310
|
+
Wrap NDArray of references to arbitrary Python objects.
|
|
311
|
+
|
|
312
|
+
"""
|
|
180
313
|
super().__init__(ndarray)
|
|
181
314
|
|
|
182
315
|
def __repr__(self) -> str:
|
|
183
|
-
|
|
316
|
+
"""
|
|
317
|
+
.. admonition:: repr string
|
|
318
|
+
|
|
319
|
+
:returns: String to reproduce the wrapped object
|
|
320
|
+
reference ndarray.
|
|
321
|
+
|
|
322
|
+
"""
|
|
323
|
+
return 'HWrapNDArrayObject(' + self._ndarray_repr() + ')'
|
|
184
324
|
|
|
185
325
|
|
|
186
326
|
class HWrapNDArrayDateTime(HWrapNDArray):
|
|
187
|
-
"""
|
|
327
|
+
"""
|
|
328
|
+
.. admonition:: wrapped datetime ndarray
|
|
188
329
|
|
|
330
|
+
Class for a hashable wrapped datatime ndarray.
|
|
331
|
+
|
|
332
|
+
"""
|
|
189
333
|
def __init__(self, ndarray: npt.NDArray[np.datetime64]) -> None:
|
|
334
|
+
"""
|
|
335
|
+
.. admonition:: init
|
|
336
|
+
|
|
337
|
+
Wrap NDArray of datetimes.
|
|
338
|
+
|
|
339
|
+
"""
|
|
190
340
|
super().__init__(ndarray)
|
|
191
341
|
|
|
192
342
|
def __repr__(self) -> str:
|
|
193
|
-
|
|
343
|
+
"""
|
|
344
|
+
.. admonition:: repr string
|
|
345
|
+
|
|
346
|
+
:returns: String to reproduce the wrapped datetime ndarray.
|
|
347
|
+
|
|
348
|
+
"""
|
|
349
|
+
return 'HWrapNDArrayTimeDelta(' + self._ndarray_repr() + ')'
|
|
194
350
|
|
|
195
351
|
|
|
196
352
|
class HWrapNDArrayTimeDelta(HWrapNDArray):
|
|
197
|
-
"""
|
|
353
|
+
"""
|
|
354
|
+
.. admonition:: wrapped timedelta ndarray
|
|
355
|
+
|
|
356
|
+
Class for a hashable wrapped timedelta ndarray.
|
|
198
357
|
|
|
358
|
+
"""
|
|
199
359
|
def __init__(self, ndarray: npt.NDArray[np.timedelta64]) -> None:
|
|
360
|
+
"""
|
|
361
|
+
.. admonition:: init
|
|
362
|
+
|
|
363
|
+
Wrap NDArray of timedeltas.
|
|
364
|
+
|
|
365
|
+
"""
|
|
200
366
|
super().__init__(ndarray)
|
|
201
367
|
|
|
202
368
|
def __repr__(self) -> str:
|
|
203
|
-
|
|
369
|
+
"""
|
|
370
|
+
.. admonition:: repr string
|
|
371
|
+
|
|
372
|
+
:returns: String to reproduce the wrapped timedelta ndarray.
|
|
373
|
+
|
|
374
|
+
"""
|
|
375
|
+
return 'HWrapNDArrayTimeDelta(' + self._ndarray_repr() + ')'
|
|
204
376
|
|
|
205
377
|
|
|
206
378
|
class HWrapNDArrayBool(HWrapNDArray):
|
|
207
|
-
"""
|
|
379
|
+
"""
|
|
380
|
+
.. admonition:: wrapped Boolean ndarray
|
|
208
381
|
|
|
209
|
-
|
|
210
|
-
subtypes of int.
|
|
382
|
+
Class for a hashable wrapped Boolean ndarray.
|
|
211
383
|
|
|
212
|
-
|
|
384
|
+
.. note::
|
|
213
385
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
386
|
+
NumPy Booleans are actual Booleans, unlike Python bools
|
|
387
|
+
which are subtypes of int.
|
|
388
|
+
|
|
389
|
+
- ``*`` uses component-wise Boolean **and**
|
|
390
|
+
- ``+`` uses component-wise Boolean **or**
|
|
391
|
+
- ``@`` matrix multiplication using **and** then **or**
|
|
217
392
|
|
|
218
393
|
"""
|
|
219
394
|
|
|
220
395
|
def __init__(self, ndarray: npt.NDArray[np.bool_]) -> None:
|
|
396
|
+
"""
|
|
397
|
+
.. admonition:: init
|
|
398
|
+
|
|
399
|
+
Wrap NDArray of Booleans.
|
|
400
|
+
|
|
401
|
+
"""
|
|
221
402
|
super().__init__(ndarray)
|
|
222
403
|
|
|
223
404
|
def __repr__(self) -> str:
|
|
224
|
-
|
|
405
|
+
"""
|
|
406
|
+
.. admonition:: repr string
|
|
407
|
+
|
|
408
|
+
:returns: String to reproduce the wrapped Boolean ndarray.
|
|
409
|
+
|
|
410
|
+
"""
|
|
411
|
+
return 'HWrapNDArrayBool(' + self._ndarray_repr() + ')'
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
import numpy as np
|
|
3
|
+
import numpy.typing as npt
|
|
4
|
+
from abc import ABC
|
|
5
|
+
from enum import Enum
|
|
6
|
+
|
|
7
|
+
__all__ = ['DTypes', 'HWrapNDArray', 'HWrapNDArrayNumber', 'HWrapNDArrayString', 'HWrapNDArrayBytes', 'HWrapNDArrayVoid', 'HWrapNDArrayObject', 'HWrapNDArrayDateTime', 'HWrapNDArrayTimeDelta', 'HWrapNDArrayBool']
|
|
8
|
+
|
|
9
|
+
class DTypes(Enum):
|
|
10
|
+
number = ...
|
|
11
|
+
str_ = ...
|
|
12
|
+
bytes = ...
|
|
13
|
+
void = ...
|
|
14
|
+
object_ = ...
|
|
15
|
+
datetime64 = ...
|
|
16
|
+
timedelta64 = ...
|
|
17
|
+
bool_ = ...
|
|
18
|
+
|
|
19
|
+
class HWrapNDArray(ABC, metaclass=abc.ABCMeta):
|
|
20
|
+
def __init__(self, ndarray: npt.NDArray[np.generic]) -> None: ...
|
|
21
|
+
def __call__(self) -> npt.NDArray[np.number]: ...
|
|
22
|
+
def __hash__(self) -> int: ...
|
|
23
|
+
def __eq__(self, other: object) -> bool: ...
|
|
24
|
+
def copy(self) -> npt.NDArray[np.number]: ...
|
|
25
|
+
|
|
26
|
+
class HWrapNDArrayNumber(HWrapNDArray):
|
|
27
|
+
def __init__(self, ndarray: npt.NDArray[np.number]) -> None: ...
|
|
28
|
+
|
|
29
|
+
class HWrapNDArrayString(HWrapNDArray):
|
|
30
|
+
def __init__(self, ndarray: npt.NDArray[np.str_]) -> None: ...
|
|
31
|
+
|
|
32
|
+
class HWrapNDArrayBytes(HWrapNDArray):
|
|
33
|
+
def __init__(self, ndarray: npt.NDArray[np.bytes_]) -> None: ...
|
|
34
|
+
|
|
35
|
+
class HWrapNDArrayVoid(HWrapNDArray):
|
|
36
|
+
def __init__(self, ndarray: npt.NDArray[np.void]) -> None: ...
|
|
37
|
+
|
|
38
|
+
class HWrapNDArrayObject(HWrapNDArray):
|
|
39
|
+
def __init__(self, ndarray: npt.NDArray[np.object_]) -> None: ...
|
|
40
|
+
|
|
41
|
+
class HWrapNDArrayDateTime(HWrapNDArray):
|
|
42
|
+
def __init__(self, ndarray: npt.NDArray[np.datetime64]) -> None: ...
|
|
43
|
+
|
|
44
|
+
class HWrapNDArrayTimeDelta(HWrapNDArray):
|
|
45
|
+
def __init__(self, ndarray: npt.NDArray[np.timedelta64]) -> None: ...
|
|
46
|
+
|
|
47
|
+
class HWrapNDArrayBool(HWrapNDArray):
|
|
48
|
+
def __init__(self, ndarray: npt.NDArray[np.bool_]) -> None: ...
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythonic-fp-numpy
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: NumPy Tools
|
|
5
5
|
Keywords: numpy,ndarray,hashable,wrap
|
|
6
6
|
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
7
7
|
Requires-Python: >=3.13
|
|
8
8
|
Description-Content-Type: text/x-rst
|
|
9
|
-
Classifier: Development Status ::
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
10
|
Classifier: Framework :: Pytest
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
15
|
Classifier: Typing :: Typed
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: numpy>=2.3.4
|
|
18
|
-
Requires-Dist: boring-math-abstract-algebra ; extra == "test"
|
|
18
|
+
Requires-Dist: boring-math-abstract-algebra>=1.1.0 ; extra == "test"
|
|
19
19
|
Requires-Dist: pytest>=8.4.1 ; extra == "test"
|
|
20
20
|
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-numpy/blob/main/CHANGELOG.rst
|
|
21
|
-
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/numpy
|
|
22
|
-
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
|
|
21
|
+
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/projects/numpy.html
|
|
22
|
+
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
|
|
23
23
|
Project-URL: Source, https://github.com/grscheller/pythonic-fp-numpy
|
|
24
24
|
Provides-Extra: test
|
|
25
25
|
|
|
26
|
-
Pythonic FP - FP
|
|
26
|
+
Pythonic FP - FP Numpy
|
|
27
27
|
======================
|
|
28
28
|
|
|
29
29
|
PyPI project
|
|
30
30
|
`pythonic-fp-numpy
|
|
31
31
|
<https://pypi.org/project/pythonic-fp-numpy>`_.
|
|
32
32
|
|
|
33
|
-
Python
|
|
33
|
+
Python package implementing functional programming for NumPy.
|
|
34
34
|
|
|
35
35
|
Part of the
|
|
36
36
|
`pythonic-fp
|
|
37
|
-
<https://grscheller.github.io/pythonic-fp
|
|
37
|
+
<https://grscheller.github.io/pythonic-fp/>`_
|
|
38
38
|
PyPI projects.
|
|
39
39
|
|
|
40
40
|
Modules
|
|
@@ -43,20 +43,20 @@ Modules
|
|
|
43
43
|
Module hashable_wrapped_ndarray
|
|
44
44
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
45
45
|
|
|
46
|
-
- wrap
|
|
46
|
+
- wrap readonly NDArrays to make them hashable
|
|
47
47
|
- prioritize performance over safety
|
|
48
48
|
- see PyPI project boring-math-abstract-algebra for a use case
|
|
49
49
|
|
|
50
50
|
Documentation
|
|
51
51
|
-------------
|
|
52
52
|
|
|
53
|
-
Documentation for this project
|
|
53
|
+
Documentation and other links for this project are hosted on
|
|
54
54
|
`GitHub Pages
|
|
55
|
-
<https://grscheller.github.io/pythonic-fp/numpy>`_.
|
|
55
|
+
<https://grscheller.github.io/pythonic-fp/projects/numpy.html>`_.
|
|
56
56
|
|
|
57
57
|
Copyright and License
|
|
58
58
|
---------------------
|
|
59
59
|
|
|
60
|
-
Copyright (c) 2025 Geoffrey R. Scheller. Licensed under the Apache
|
|
60
|
+
Copyright (c) 2025-2026 Geoffrey R. Scheller. Licensed under the Apache
|
|
61
61
|
License, Version 2.0. See the LICENSE file for details.
|
|
62
62
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
pythonic_fp/numpy/__init__.py,sha256=dL-LF98cK5PId82_PBhTq9iTnfZthQkCq_jBTSKKBN0,964
|
|
2
|
+
pythonic_fp/numpy/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
pythonic_fp/numpy/hashable_wrapped_ndarray.py,sha256=Y8ZKHuD_Rw754fagc1cvTztgAwtt58uu58fY5If8HCI,10798
|
|
4
|
+
pythonic_fp/numpy/hashable_wrapped_ndarray.pyi,sha256=J4jsl5q5Lz15-Amunh824R5JOxZk8hnSUlDuPXa5lcs,1666
|
|
5
|
+
pythonic_fp/numpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
pythonic_fp_numpy-1.0.0.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
7
|
+
pythonic_fp_numpy-1.0.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
8
|
+
pythonic_fp_numpy-1.0.0.dist-info/METADATA,sha256=r_FLuxuoFdJQR9qX3DZbNEBt6kO-lePS5RYgjLMM6DM,1917
|
|
9
|
+
pythonic_fp_numpy-1.0.0.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
pythonic_fp/numpy/__init__.py,sha256=m4lHMlHUem6qWnVan0rzdjlCTrXYG7HJuFreFpfjqrE,1349
|
|
2
|
-
pythonic_fp/numpy/hashable_wrapped_ndarray.py,sha256=IUy3XjNfBsKMRUQu5X7HWRV_dv5wGfC65_6oFmyoxi8,6798
|
|
3
|
-
pythonic_fp/numpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
pythonic_fp_numpy-0.1.1.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
5
|
-
pythonic_fp_numpy-0.1.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
6
|
-
pythonic_fp_numpy-0.1.1.dist-info/METADATA,sha256=SFt1OjsWkILoPA_3pcm5YKPdAfl-SiyXskkpadpjZHI,1896
|
|
7
|
-
pythonic_fp_numpy-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|