Skip to content

Commit

Permalink
HdfStorage.read: fix rowNumbers for all start/end values
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sbesson committed Sep 19, 2024
1 parent 4fd72ef commit 0882917
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/omero/hdfstorageV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,8 @@ def read(self, stamp, colNumbers, start, stop, current):

for col in cols:
col.read(self.__mea, start, stop)
if start is not None and stop is not None:
rowNumbers = list(range(start, stop))
elif start is not None and stop is None:
rowNumbers = list(range(start, self.__length()))
elif start is None and stop is None:
rowNumbers = list(range(self.__length()))

allRows = list(range(self.__length()))
rowNumbers = allRows[start:stop]
return self._as_data(cols, rowNumbers, current)

@stamped
Expand Down

0 comments on commit 0882917

Please sign in to comment.