HdfStorage.read: fix rowNumbers for all start/end values #430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Under some conditions, the rowNumbers array returned as part of the data was inconsistent with the range of rows selected by the tables.Table.read() API. As the start/end parameters are expected to have the same meaning as the built-in Python slices, this modifies the current implementation to slice all row numbers using these values using start/end.
Discovered as part of the work on ome/openmicroscopy#6412 to cover the different cases of the current table reading API. With this change included, all the test cases in
testReadStartEnd
introduced in ome/openmicroscopy#6412 should pass. Without it, several of therowNumbers
checks will fail.This can also be tested manually e.g. by loading an existing table and calling
table.read()
withstart/end
values outside the[0 getNumberOfRows() - 1]
range e.g.Without this change, the above should return incorrect values for
rowNumbers
. With this change, therowNumbers
should be consistent with the[start:end]
slice and thecolumns
value