summaryrefslogtreecommitdiffstats
path: root/python/astra/optomo.py
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-29 13:15:47 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-29 13:15:47 +0200
commit9f86a4c3f20ac8785f80288ec4cdefe79ed67e68 (patch)
treede8153fb6481096f21bc0056d552571662df0071 /python/astra/optomo.py
parent0f314f9fb219157ed3988ee08e0a8132301105ff (diff)
parent7a4cfe2e5fe384691f0516020b2fcd48b35a7f63 (diff)
downloadastra-9f86a4c3f20ac8785f80288ec4cdefe79ed67e68.tar.gz
astra-9f86a4c3f20ac8785f80288ec4cdefe79ed67e68.tar.bz2
astra-9f86a4c3f20ac8785f80288ec4cdefe79ed67e68.tar.xz
astra-9f86a4c3f20ac8785f80288ec4cdefe79ed67e68.zip
Merge branch 'master'
Diffstat (limited to 'python/astra/optomo.py')
-rw-r--r--python/astra/optomo.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/python/astra/optomo.py b/python/astra/optomo.py
index 0c37353..0108674 100644
--- a/python/astra/optomo.py
+++ b/python/astra/optomo.py
@@ -32,7 +32,13 @@ from . import creators
from . import algorithm
from . import functions
import numpy as np
-from six.moves import range, reduce
+from six.moves import reduce
+try:
+ from six.moves import range
+except ImportError:
+ # six 1.3.0
+ from six.moves import xrange as range
+
import operator
import scipy.sparse.linalg
@@ -158,7 +164,7 @@ class OpTomo(scipy.sparse.linalg.LinearOperator):
:param extraOptions: Extra options to use during reconstruction (i.e. for cfg['option']).
:type extraOptions: :class:`dict`
"""
- self.__checkArray(s, self.sshape)
+ s = self.__checkArray(s, self.sshape)
sid = self.data_mod.link('-sino',self.pg,s)
v = np.zeros(self.vshape,dtype=np.float32)
vid = self.data_mod.link('-vol',self.vg,v)