summaryrefslogtreecommitdiffstats
path: root/python/astra/data2d_c.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'python/astra/data2d_c.pyx')
-rw-r--r--python/astra/data2d_c.pyx10
1 files changed, 2 insertions, 8 deletions
diff --git a/python/astra/data2d_c.pyx b/python/astra/data2d_c.pyx
index 29548b5..4919bf2 100644
--- a/python/astra/data2d_c.pyx
+++ b/python/astra/data2d_c.pyx
@@ -78,14 +78,8 @@ def create(datatype, geometry, data=None, link=False):
cdef CFloat32Data2D * pDataObject2D
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)