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.1.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for numpy_serializer-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ebf412e10f4851058274b84781e82fa0dafff2a599acd185ee3536956c2ecf |
|
MD5 | 5c39d807cf0aced48d2be132e91c0016 |
|
BLAKE2b-256 | 0de731b37f126a43219cbb275e857ebb3fc1b2882cbe2bb2f55fd6759e93f3b2 |