Preserve numpy arrays shapes while serializing them to bytes
Project description
numpy-serializer
Motivation
I couldn't find a nice high-level package that is fast enough to serialize and deserialize numpy arrays while preserving the type and shape informations.
Installation
pip install numpy-serializer
How to use
import numpy_serializer as ns
import numpy as np
a = np.random.normal(size=(50,120,150))
b = ns.to_bytes(a)
c = ns.from_bytes(b)
assert np.array_equal(a,c)
License
This project is licensed under the GPL-3 license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
numpy-serializer-0.1.2.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for numpy_serializer-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b76d42900b520147bfce7c70495c25bfb75364a0ac8fe8253580e9935374cb4 |
|
MD5 | 3f74ffde8a4e69540b3874466ea9486f |
|
BLAKE2b-256 | 76d531ee2b7768573bd1b7b88dad78b0ce7fe205bb38697bedd6125425442f47 |