python-blosc2
python-blosc2 copied to clipboard
Allow to create an array with shape = (0, 0)
The next example should work.
import blosc2
shape = (0, 0)
# Create an array
a = blosc2.zeros(shape, chunks=(10, 10), blocks=(5,5))
a.resize((5,5))
# Get slice as a NumPy array
print(a[:5, :5])
a[:5, :5] = 0
print(a[...])