Bigarray

Latest version: v0.2.2

Safety actively analyzes 621920 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.2.2

0.2.1

0.2.0

PointerArray` is a _memory-mapped array_ support descriptive indexing.

Example writing:
python
import numpy as np

from bigarray import PointerArray, PointerArrayWriter

with PointerArrayWriter('/tmp/array',
shape=(0,),
dtype='float64',
remove_exist=True) as f:
NOTE: this write method support multiprocessing write
(use different `start_position` for multiprocessing)
f.write({
'name0': np.arange(0, 10),
'name1': np.arange(10, 20),
},
start_position=0)

x = PointerArray('/tmp/array')
print(x)

for name, (start, end) in x.indices.items():
print(name, start, end, x[start:end])

fast indexing
for name in x.indices:
print(name, x[name])


Output from above programme:

[ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19.]
name0 0 10 [0. 1. 2. 3. 4. 5. 6. 7. 8. 9.]
name1 10 20 [10. 11. 12. 13. 14. 15. 16. 17. 18. 19.]
name0 [0. 1. 2. 3. 4. 5. 6. 7. 8. 9.]
name1 [10. 11. 12. 13. 14. 15. 16. 17. 18. 19.]

0.1.0

Initial release includes:

* `MmapArrayWriter`
* `MmapArray`
* unittests
* Benchmarks

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.