All Projects → lebedov → Msgpack Numpy

lebedov / Msgpack Numpy

Licence: other
Serialize numpy arrays using msgpack

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Msgpack Numpy

ormsgpack
Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]
Stars: ✭ 88 (-40.14%)
Mutual labels:  numpy, msgpack
Nptdms
NumPy based Python module for reading TDMS files produced by LabView
Stars: ✭ 138 (-6.12%)
Mutual labels:  numpy
Color Tracker
Color tracking with OpenCV
Stars: ✭ 128 (-12.93%)
Mutual labels:  numpy
Jyni
Enables Jython to load native CPython extensions.
Stars: ✭ 131 (-10.88%)
Mutual labels:  numpy
Numcpp
C++ implementation of the Python Numpy library
Stars: ✭ 2,031 (+1281.63%)
Mutual labels:  numpy
Ml Cheatsheet
A constantly updated python machine learning cheatsheet
Stars: ✭ 136 (-7.48%)
Mutual labels:  numpy
Teaching Monolith
Data science teaching materials
Stars: ✭ 126 (-14.29%)
Mutual labels:  numpy
Ncls
The Nested Containment List for Python. Basically a static interval-tree that is silly fast for both construction and lookups.
Stars: ✭ 142 (-3.4%)
Mutual labels:  numpy
Irwin
irwin - the protector of lichess from all chess players villainous
Stars: ✭ 138 (-6.12%)
Mutual labels:  numpy
Pyjson tricks
Extra features for Python's JSON: comments, order, numpy, pandas, datetimes, and many more! Simple but customizable.
Stars: ✭ 131 (-10.88%)
Mutual labels:  numpy
Ds Ai Tech Notes
📖 [译] 数据科学和人工智能技术笔记
Stars: ✭ 131 (-10.88%)
Mutual labels:  numpy
Tiny ml
numpy 实现的 周志华《机器学习》书中的算法及其他一些传统机器学习算法
Stars: ✭ 129 (-12.24%)
Mutual labels:  numpy
Veros
The versatile ocean simulator, in pure Python, powered by Bohrium.
Stars: ✭ 136 (-7.48%)
Mutual labels:  numpy
Swiftmsgpack
💬 Fast & Lightweight MsgPack Serializer & Deserializer for Swift
Stars: ✭ 128 (-12.93%)
Mutual labels:  msgpack
Python Cheat Sheet
Python Cheat Sheet NumPy, Matplotlib
Stars: ✭ 1,739 (+1082.99%)
Mutual labels:  numpy
Data Science For Marketing Analytics
Achieve your marketing goals with the data analytics power of Python
Stars: ✭ 127 (-13.61%)
Mutual labels:  numpy
Root numpy
The interface between ROOT and NumPy
Stars: ✭ 130 (-11.56%)
Mutual labels:  numpy
Machine Learning Projects
This repository consists of all my Machine Learning Projects.
Stars: ✭ 135 (-8.16%)
Mutual labels:  numpy
Piecewise linear fit py
fit piecewise linear data for a specified number of line segments
Stars: ✭ 141 (-4.08%)
Mutual labels:  numpy
Data Analysis
主要是爬虫与数据分析项目总结,外加建模与机器学习,模型的评估。
Stars: ✭ 142 (-3.4%)
Mutual labels:  numpy

Numpy Data Type Serialization Using Msgpack

Package Description

This package provides encoding and decoding routines that enable the serialization and deserialization of numerical and array data types provided by numpy using the highly efficient msgpack format. Serialization of Python's native complex data types is also supported.

Latest Version Build Status

Installation

msgpack-numpy requires msgpack-python and numpy. If you have pip installed on your system, run

pip install msgpack-numpy

to install the package and all dependencies. You can also download the source tarball, unpack it, and run

python setup.py install

from within the source directory.

Usage

The easiest way to use msgpack-numpy is to call its monkey patching function after importing the Python msgpack package:

import msgpack
import msgpack_numpy as m
m.patch()

This will automatically force all msgpack serialization and deserialization routines (and other packages that use them) to become numpy-aware. Of course, one can also manually pass the encoder and decoder provided by msgpack-numpy to the msgpack routines:

import msgpack
import msgpack_numpy as m
import numpy as np

x = np.random.rand(5)
x_enc = msgpack.packb(x, default=m.encode)
x_rec = msgpack.unpackb(x_enc, object_hook=m.decode)

msgpack-numpy will try to use the binary (fast) extension in msgpack by default.
If msgpack was not compiled with Cython (or if the MSGPACK_PUREPYTHON variable is set), it will fall back to using the slower pure Python msgpack implementation.

Notes

The primary design goal of msgpack-numpy is ensuring preservation of numerical data types during msgpack serialization and deserialization. Inclusion of type information in the serialized data necessarily incurs some storage overhead; if preservation of type information is not needed, one may be able to avoid some of this overhead by writing a custom encoder/decoder pair that produces more efficient serializations for those specific use cases.

Note that numpy arrays deserialized by msgpack-numpy are read-only and must be copied if they are to be modified.

Development

The latest source code can be obtained from GitHub.

msgpack-numpy maintains compatibility with python versions 2.7 and 3.5+.

Install tox to support testing across multiple python versions in your development environment. If you use conda to install python use tox-conda to automatically manage testing across all supported python versions.

# Using a system python
pip install tox

# Additionally, using a conda-provided python
pip install tox tox-conda

Execute tests across supported python versions:

tox

Authors

See the included AUTHORS.md file for more information.

License

This software is licensed under the BSD License. See the included LICENSE.md file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].