Skip to content
Snippets Groups Projects
Commit f8446789 authored by David GEISSBUHLER's avatar David GEISSBUHLER
Browse files

fix for one frame

parent 81f63def
Branches
Tags
1 merge request!1fixed slices
Pipeline #36490 failed
......@@ -413,15 +413,13 @@ class StreamFile():
if isinstance(index, int):
data = self.hdf5_file.lread(data_path, index)
return data
return np.stack([data])
elif isinstance(index, slice):
num_frame = self.get_stream_shape(stream_name)
print(num_frame)
if index.step == None:
indices = list(range(index.start, index.stop))
else:
indices = list(range(index.start, index.stop, index.step))
print(indices)
data = np.stack([self.hdf5_file.lread(data_path, i) for i in indices])
return data
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment