hdmf
hdmf copied to clipboard
[Bug]: warning for incorrect data shape for dataset of references
What happened?
When running Images roundtrip tests, get_dimension_labels_from_spec returns a warning because the shape of the
ImageReferences dataset does not match the shape of the spec.
The shape of image references is calculated from get_data_shape as [num_images, x, y], where x, y are the shape of the image data, while the shape expected from ImageReferences in the schema is [num_images].
Steps to Reproduce
pytest tests/integration/hdf5/test_base.py # from pynwb test suite
Traceback
tests/integration/hdf5/test_base.py::TestImagesIO::test_roundtrip
tests/integration/hdf5/test_base.py::TestImagesIO::test_roundtrip_export
/Users/smprince/Documents/code/hdmf/src/hdmf/build/objectmapper.py:868: IncorrectDatasetShapeBuildWarning: Shape of data does not match shape in spec 'ImageReferences'
warnings.warn(msg, IncorrectDatasetShapeBuildWarning)
Operating System
macOS
Python Executable
Conda
Python Version
3.12
Package Versions
No response