Commit 497d71c6 authored by David GEISSBUHLER's avatar David GEISSBUHLER
Browse files

fixed shape

parent 8bb42112
......@@ -87,8 +87,7 @@ assert(stream_sl.ndim == data_sl.ndim)
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.shape == data_sl.shape)
assert(stream_sl.ndim == data_sl.ndim)
assert(np.array_equal(stream_sl.load(), data_sl))
......@@ -341,9 +341,13 @@ class StreamSlice(StreamFilter):
__shape = [self.parent.get_axis_size(0, self.frame_slice)]
# ... and others
for d in range(1, self.parent.ndim):
if self.bulk_slice is not None and d+1 < len(self.bulk_slice):
__slice_index = self.bulk_slice[d+1]
__shape.append(self.parent.get_axis_size(d, __slice_index))
if self.bulk_slice is not None and d-1 < len(self.bulk_slice):
__slice_index = self.bulk_slice[d-1]
# don't add axis to shape if integer slice
if isinstance(__slice_index, int):
__shape.append(self.parent.get_axis_size(d, __slice_index))
return tuple(__shape)
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