Closed subiol closed 7 years ago
Try the latest revision on Github - if it fixes the problem, I'll post a new release.
Hi, this is what I get when I run the test using the last git version:
$ python test_msgpack_numpy.py [(39133, 628009281, 103670, 4, b'a') (39133, 628009283, 103670, 10, b'a') (39198, 628010832, 103662, 28, b'b') (43248, 628119055, 103247, 26, b'b') (43252, 628119143, 103246, 6, b'b') (43254, 628119186, 103246, 22, b'b')] 6 (6,) [('arg0', '<u4'), ('arg1', '<u4'), ('arg2', '<u4'), ('arg3', '<u4'), ('arg4', 'S1')] Traceback (most recent call last): File "test_msgpack_numpy.py", line 23, in
decoded_arr = msgpack.unpackb(x_enc, object_hook=m.decode) File "msgpack/_unpacker.pyx", line 139, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:2068) File "/home/jo/anaconda3/envs/mntest/lib/python3.6/site-packages/msgpack_numpy.py", line 71, in decode dtype=np.dtype(descr)).reshape(obj[b'shape']) TypeError: data type not understood
Added another fix - try again.
Test is working fine now. I'll do some more work on this so I will test similar cases further, but it seems to be working fine now.
I have tried a couple more different data types that I use and I have found no problem, everything gets processed correctly. So for my part this issue can be closed.
Package updated to 0.3.9.
I have installed the recent msgpack-numpy 0.3.8 using pip. I am using python 3.6.0, numpy 1.12.0, msgpack-python 0.4.8 . The array I am getting out is completely different than the one that I packed. I have tried the example in the readme and it works fine, so I have create a short script that reproduces the behaviour:
when I run this script I get:
So as you can see the array packed and the array unpacked are very different.