Commit 8bb42112 authored by David GEISSBUHLER's avatar David GEISSBUHLER
Browse files

fixed __bulk_slice_full

parent caa52391
......@@ -84,6 +84,14 @@ assert(stream_sl.shape == data_sl.shape)
assert(stream_sl.ndim == data_sl.ndim)
#assert(np.array_equal(stream_sl.load(), data_sl))
stream_sl = stream_a[:,1]
data_sl = data_a[:,1]
print(stream_sl.shape, data_sl.shape)
#assert(stream_sl.shape == data_sl.shape)
assert(stream_sl.ndim == data_sl.ndim)
assert(np.array_equal(stream_sl.load(), data_sl))
###########
#fo = StreamFile('api_test.h5', 'w')
......
......@@ -373,5 +373,17 @@ class StreamSlice(StreamFilter):
return super().load(indices)
def process(self, data, indices):
print('process inidices', indices)
return data
\ No newline at end of file
# generate full bulk slice
__bulk_slice_full = [slice(None, None, None) for d in range(self.parent.ndim - 1)]
if self.bulk_slice is not None:
for d in range(self.ndim - 1):
if d < len(self.bulk_slice):
if self.bulk_slice[d] is not None:
# should be int or slice
__bulk_slice_full[d] = self.bulk_slice[d]
self.__bulk_slice_full = tuple(__bulk_slice_full)
print('self.__bulk_slice_full', self.__bulk_slice_full)
return super().process(data, indices)
def process_frame(self, data, data_index, stream_index):
return data[self.__bulk_slice_full]
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment