diff options
Diffstat (limited to 'python/astra/data3d_c.pyx')
-rw-r--r-- | python/astra/data3d_c.pyx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx index 30745b4..3b27ab7 100644 --- a/python/astra/data3d_c.pyx +++ b/python/astra/data3d_c.pyx @@ -69,14 +69,8 @@ def create(datatype,geometry,data=None, link=False): cdef CConeProjectionGeometry3D* pppGeometry cdef CFloat32CustomMemory * pCustom - if link: - geomSize = geom_size(geometry) - if len(data.shape)==1: - if data.size!=reduce(operator.mul,geomSize): - raise Exception("The dimensions of the data do not match those specified in the geometry.") - else: - if data.shape!=geomSize: - raise Exception("The dimensions of the data do not match those specified in the geometry.") + if link and data.shape!=geom_size(geometry): + raise Exception("The dimensions of the data do not match those specified in the geometry.") if datatype == '-vol': cfg = utils.dictToConfig(six.b('VolumeGeometry'), geometry) |