Example #1
0
 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
Example #2
0
 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