numpy-serializer

Preserve numpy arrays shapes while serializing them to bytes


Keywords
bytes, deserialization, deserialize, deserializer, msgpack, numpy, raw, serialize, serializer, serializers
License
GPL-2.0+
Install
pip install numpy-serializer==0.1.3

Documentation

numpy-serializer

numpy-serializer Logo

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.