-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
category: bugerrors in the code or code behaviorerrors in the code or code behaviorpriority: mediumnon-critical problem and/or affecting only a small set of usersnon-critical problem and/or affecting only a small set of users
Description
What happened?
Zarr attributes fail to validate against an attribute spec with dtype=float64. This is because Zarr reads the attributes (in .zattrs, a JSON file), as Python-native float, and the HDMF validator reads float values as dtype="float" which in HDMF aliases to float32. This is incorrect because Python-native floats are 64-bit.
Similarly, Python-native int has unlimited precision and so should be aliased to int64, not int32.
NWBHDF5IO/h5py reads scalars as numpy objects with numpy dtypes so this is not an issue there.
I believe this issue would also come up when validating in-memory, unwritten files.
This is blocking validation of some Allen Institute zarr files that have an extension with an attribute with float64 dtype.
Steps to Reproduce
...Traceback
Operating System
Windows
Python Version
3.13
Package Versions
No response
Metadata
Metadata
Assignees
Labels
category: bugerrors in the code or code behaviorerrors in the code or code behaviorpriority: mediumnon-critical problem and/or affecting only a small set of usersnon-critical problem and/or affecting only a small set of users