Metadata-Version: 2.1
Name: msgpack-numpy
Version: 0.4.4
Summary: Numpy data serialization using msgpack
Home-page: https://github.com/lebedov/msgpack-numpy
Author: Lev E. Givon
Author-email: lev@columbia.edu
License: BSD
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Requires-Dist: numpy (>=1.9.0)
Requires-Dist: msgpack (>=0.3.0)

Package Description
-------------------
This package provides encoding and decoding routines that enable the
serialization and deserialization of numerical and array data types provided by 
`numpy <http://www.numpy.org/>`_ using the highly efficient
`msgpack <http://msgpack.org/>`_ format. Serialization of Python's
native complex data types is also supported.

.. image:: https://img.shields.io/pypi/v/msgpack-numpy.svg
    :target: https://pypi.python.org/pypi/msgpack-numpy
    :alt: Latest Version

Installation
------------
msgpack-numpy requires msgpack-python and numpy. If you 
have `pip <http://www.pip-installer.org/>`_ 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.

Development
-----------
The latest source code can be obtained from
`GitHub <https://github.com/lebedov/msgpack-numpy/>`_.

Authors
-------
See the included `AUTHORS.rst 
<https://github.com/lebedov/msgpack-numpy/blob/master/AUTHORS.rst>`_ file for 
more information.

License
-------
This software is licensed under the `BSD License 
<http://www.opensource.org/licenses/bsd-license>`_.
See the included `LICENSE.rst 
<https://github.com/lebedov/msgpack-numpy/blob/master/LICENSE.rst>`_ file for 
more information.


