Skip to main content

Preserve numpy arrays shapes while serializing them to bytes

Project description

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.

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.3.tar.gz (1.9 kB view hashes)

Uploaded Source

Built Distribution

numpy_serializer-0.1.3-py3-none-any.whl (14.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page