def combine_sliced_values(self, values): if type(values) is tuple: combined_values = tuple( [sum(reshape(v, (self.slices, -1)), axis=0) for v in values]) else: combined_values = sum(reshape(values, (self.slices, -1)), axis=0) return combined_values
def combine_sliced_values(self, values): if type(values) is tuple: combined_values = tuple([sum(reshape(v, (self.slices, -1)), axis=0) for v in values]) else: combined_values = sum(reshape(values, (self.slices, -1)), axis=0) return combined_values