Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: warning for incorrect data shape for dataset of references #1191

Open
stephprince opened this issue Sep 6, 2024 · 0 comments
Open
Assignees
Labels
category: bug errors in the code or code behavior priority: medium non-critical problem and/or affecting only a small set of users
Milestone

Comments

@stephprince
Copy link
Contributor

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

@rly rly added the category: bug errors in the code or code behavior label Sep 6, 2024
@rly rly added this to the Next Major Release - 4.0 milestone Sep 6, 2024
@rly rly added the priority: medium non-critical problem and/or affecting only a small set of users label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior priority: medium non-critical problem and/or affecting only a small set of users
Projects
None yet
Development

No branches or pull requests

3 participants