-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
Hi numcodecs devs,
I found that you can't roundtrip compression & decompression with an empty numpy array:
import numpy as np
import numcodecs
print(numcodecs.__version__)
# '0.16.5'
arr = np.array([])
codec = numcodecs.Blosc(cname="zstd", clevel=1, shuffle=numcodecs.Blosc.BITSHUFFLE)
# roundtrip
codec.decode(codec.encode(arr.tobytes()))
# ---------------------------------------------------------------------------
# RuntimeError Traceback (most recent call last)
# Cell In[14], line 1
# ----> 1 codec.decode(codec.encode(arr.tobytes()))
#
# File numcodecs/blosc.pyx:500, in numcodecs.blosc.Blosc.decode()
#
# File numcodecs/blosc.pyx:399, in numcodecs.blosc.decompress()
#
# RuntimeError: error during blosc decompression: 0I didn't find anything in the docs if this is expected behavior or not?
Best, Peter
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels