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
NumPy's data type API happily treats the user's requested data type as a suggestion rather than an instruction. Oh well.
In Zarr-python 2, these 0-length data types exposed some weird behavior, where the data type of an array did not match the data type of the numpy arrays returned when indexing that array:
A few options for zarr python, ranked by goodness, descending:
copy NumPy's bad behavior. If a user requests a 0-length data type, silently replace it with a 1-length version
allow creating 0-length data types, but raise an exception when creating an array with one.
disallow the creation of 0-length data types at the data type level.
I think option 3 makes the most sense, so I'm going to open a PR with that. But we can talk about alternatives here as well. Maybe there is a big market for these 0-length data types that I am not aware of.
Activity
d-v-b commentedon Sep 24, 2026
this was closed via #3170