From 0882917bd75b7c2c1d18866f6524d180530ca282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Thu, 19 Sep 2024 14:45:29 +0100 Subject: [PATCH] HdfStorage.read: fix rowNumbers for all start/end values 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. --- src/omero/hdfstorageV2.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/omero/hdfstorageV2.py b/src/omero/hdfstorageV2.py index ca3283dd4..e6f96639a 100755 --- a/src/omero/hdfstorageV2.py +++ b/src/omero/hdfstorageV2.py @@ -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