Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/4thel00z/numpy-serializer

numpy-serializer is a nice and high-level way to serialize numpy.arrays while preserving their shape and type.
https://github.com/4thel00z/numpy-serializer

bytes deserialization deserialize deserializer msgpack numpy raw serialize serializer serializers

Last synced: 9 days ago
JSON representation

numpy-serializer is a nice and high-level way to serialize numpy.arrays while preserving their shape and type.

Awesome Lists containing this project

README

        

# numpy-serializer

![numpy-serializer Logo](https://raw.githubusercontent.com/4thel00z/numpy-serializer/master/logo.png)

## 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

```python3
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.