Skip to content

Commit 93f867a

Browse files
committed
mention msgpack-numpy. Closes #112
1 parent 6bfe2e5 commit 93f867a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/source/tipstricks.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ These errors are caused by Numpy datatypes not being recognised by Pyro's serial
379379
would require a mapping to the appropriate Java or .NET type)
380380

381381

382+
.. sidebar:: msgpack + Numpy
383+
384+
*msgpack-numpy* (https://pypi.org/project/msgpack-numpy/) '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'.
385+
Pyro5 supports msgpack as serializer, so using that together with this library may solve the Numpy data serialization issues.
386+
382387
If you still want to use numpy with Pyro, you'll have to convert the data to standard Python datatypes before using them in Pyro.
383388
So instead of just ``na = numpy.array(...); return na;``, use this instead: ``return na.tolist()``.
384389
Or perhaps even ``return array.array('i', na)`` (serpent understands ``array.array`` just fine).

0 commit comments

Comments
 (0)