You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expected output is that the array is encoded without an exception.
The array has ndarray.nbytes=0 and ndarray.dtype.itemsize=0. NumCodecs passes these into Blosc, and eventually compute_blocksize gets called with typesize=0 and nbytes=0, causing compute_blocksize to return 0. This triggers a floating point exception on this line in initialize_context_compression().
Version and installation information
NumCodecs 0.12.1
Python 3.11.4
Linux
NumCodecs was installed using pip into a virtual environment
The text was updated successfully, but these errors were encountered:
Minimal, reproducible code sample, a copy-pastable example if possible
Problem description
This throws a floating point exception:
$ python -c "import numcodecs, numpy; numcodecs.Blosc().encode(numpy.zeros((5,), dtype=[('foo', int, (0,))]))" Floating point exception (core dumped)
The expected output is that the array is encoded without an exception.
The array has
ndarray.nbytes=0
andndarray.dtype.itemsize=0
. NumCodecs passes these into Blosc, and eventually compute_blocksize gets called withtypesize=0
andnbytes=0
, causingcompute_blocksize
to return 0. This triggers a floating point exception on this line ininitialize_context_compression()
.Version and installation information
The text was updated successfully, but these errors were encountered: