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

indexing H5DataIO #1073

Closed
bendichter opened this issue Sep 25, 2019 · 2 comments
Closed

indexing H5DataIO #1073

bendichter opened this issue Sep 25, 2019 · 2 comments
Labels
category: enhancement improvements of code or code behavior

Comments

@bendichter
Copy link
Contributor

H5DataIO[slice] currently throws an error. I would like it instead to call H5DataIO.data[slice].

Motivations

  1. This is clearly the intention.
  2. It will help with tests. I am running into an issue with the unit tests when trying to implement Make all DynamicTables chunked and resizable by default #1067 the unit tests break because several of them try to index data without checking if it's an H5DataIO object. With the proposed change, we can simply say something like assert data_out[:] == data_in and this will work whether data_out is a list, h5py.Dataset, np.array, or H5DataIO object.
@bendichter bendichter added the category: enhancement improvements of code or code behavior label Sep 25, 2019
@oruebel
Copy link
Contributor

oruebel commented Sep 25, 2019

This should be implemented in HDMF on the DataIO base class. The following PR on HDMF should fix this issue:

hdmf-dev/hdmf#141

@rly
Copy link
Contributor

rly commented Oct 1, 2019

@bendichter I believe this has been resolved. Please close if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior
Projects
None yet
Development

No branches or pull requests

3 participants