From ec6dabadd80b712beba834732042ba589038314d Mon Sep 17 00:00:00 2001 From: epapoutsellis Date: Sun, 7 Apr 2019 08:35:20 +0100 Subject: check shape BDC --- Wrappers/Python/ccpi/framework/BlockDataContainer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Wrappers/Python/ccpi/framework/BlockDataContainer.py b/Wrappers/Python/ccpi/framework/BlockDataContainer.py index 21ef3f0..9664037 100755 --- a/Wrappers/Python/ccpi/framework/BlockDataContainer.py +++ b/Wrappers/Python/ccpi/framework/BlockDataContainer.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # -*- coding: utf-8 -*- """ Created on Tue Mar 5 16:04:45 2019 @@ -23,12 +23,12 @@ class BlockDataContainer(object): '''''' self.containers = args self.index = 0 - #shape = kwargs.get('shape', None) - #if shape is None: - # shape = (len(args),1) - shape = (len(args),1) + shape = kwargs.get('shape', None) + if shape is None: + shape = (len(args),1) +# shape = (len(args),1) self.shape = shape - #print (self.shape) + n_elements = functools.reduce(lambda x,y: x*y, shape, 1) if len(args) != n_elements: raise ValueError( -- cgit v1.2.3