diff options
| author | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-07 08:35:20 +0100 | 
|---|---|---|
| committer | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-07 08:35:20 +0100 | 
| commit | ec6dabadd80b712beba834732042ba589038314d (patch) | |
| tree | 3c87a480084978d561ca0af328c60edf7a9d6fb0 | |
| parent | 2b53e85e3a6c750ac7241671662e58c9752fd686 (diff) | |
| download | framework-ec6dabadd80b712beba834732042ba589038314d.tar.gz framework-ec6dabadd80b712beba834732042ba589038314d.tar.bz2 framework-ec6dabadd80b712beba834732042ba589038314d.tar.xz framework-ec6dabadd80b712beba834732042ba589038314d.zip  | |
check shape BDC
| -rwxr-xr-x | Wrappers/Python/ccpi/framework/BlockDataContainer.py | 12 | 
1 files 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(
  | 
