We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've been trying to use the package to work with some multi-dimensional numpy arrays, unfortunately it does not seem to work
>>> import numpy as np >>> import msgpack_numpy >>> packed = msgpack_numpy.packb(np.ones((3,3))) >>> msgpack_numpy.unpackb(packed) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.9/dist-packages/msgpack_numpy.py", line 287, in unpackb return _unpackb(packed, **kwargs) File "/usr/local/lib/python3.9/dist-packages/msgpack/fallback.py", line 121, in unpackb ret = unpacker._unpack() File "/usr/local/lib/python3.9/dist-packages/msgpack/fallback.py", line 602, in _unpack ret = self._object_hook(ret) File "/usr/local/lib/python3.9/dist-packages/msgpack_numpy.py", line 103, in decode return np.ndarray(buffer=obj[b'data'], TypeError: buffer is too small for requested array
I am using numpy 1.24.4, msgpack-numpy 0.4.8 and msgpack 0.5.6 on python 3.9.5
The text was updated successfully, but these errors were encountered:
I can't seem to reproduce this:
❯ pip freeze | egrep '(msgpack-numpy|msgpack-python|numpy)' msgpack-numpy==0.4.8 msgpack-python==0.5.6 numpy==1.24.4 ❯ python --version Python 3.9.5 ❯ python -c 'import msgpack_numpy, numpy; x=numpy.ones((3,3)); s=msgpack_numpy.packb(x); print(msgpack_numpy.unpackb(s))' [[1. 1. 1.] [1. 1. 1.] [1. 1. 1.]]
Can you try reinstalling all of the packages (msgpack-python, numpy, msgpack-numpy) from scratch?
Sorry, something went wrong.
No branches or pull requests
I've been trying to use the package to work with some multi-dimensional numpy arrays, unfortunately it does not seem to work
I am using numpy 1.24.4, msgpack-numpy 0.4.8 and msgpack 0.5.6 on python 3.9.5
The text was updated successfully, but these errors were encountered: