[dataview] fix data_fetched counter
This commit is contained in:
parent
c8fe616c44
commit
93d90ddba8
@ -18,7 +18,6 @@ class DataView():
|
||||
|
||||
def request_more(self):
|
||||
if self.fully_loaded:
|
||||
print("all data fetched")
|
||||
return
|
||||
# first make sure, that the count is valid, i.e. inside data
|
||||
valid_count = self._file_handler.valid_count(self._full_shape, self._offset, self._count)
|
||||
@ -31,7 +30,7 @@ class DataView():
|
||||
new_ofst[i] = sum(x)
|
||||
|
||||
self._offset = tuple(new_ofst)
|
||||
self._fetched_data = tuple([sum(x) for x in zip(self._fetched_data, self._count)])
|
||||
self._fetched_data = tuple([sum(x) for x in zip(self._fetched_data, valid_count)])
|
||||
|
||||
def init_chunking(self):
|
||||
"""decides on the chunks size for reading. Heuristic is based on the dimensionality of the data and the "best xdim" if available.
|
||||
@ -68,8 +67,8 @@ class DataView():
|
||||
|
||||
def __str__(self) -> str:
|
||||
r = self._item_descriptor.name + " " + str(self._item_descriptor.entity_type)
|
||||
r += "buffer size: " + str(self._buffer.shape) if self._buffer is not None else "" + "\n"
|
||||
r += "chunk size:" + str(self._count)
|
||||
r += "is fully loaded: " + str(self.fully_loaded)
|
||||
r += " buffer size: " + str(self._buffer.shape) if self._buffer is not None else "" + "\n"
|
||||
r += " max chunk size: " + str(self._count)
|
||||
r += " is fully loaded: " + str(self.fully_loaded)
|
||||
return r
|
||||
|
Loading…
Reference in New Issue
Block a user