summaryrefslogtreecommitdiffstats
path: root/python/astra/optomo.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/astra/optomo.py')
-rw-r--r--python/astra/optomo.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/astra/optomo.py b/python/astra/optomo.py
index 19b07e3..4a64150 100644
--- a/python/astra/optomo.py
+++ b/python/astra/optomo.py
@@ -197,6 +197,11 @@ class OpTomoTranspose(scipy.sparse.linalg.LinearOperator):
self.parent = parent
self.dtype = np.float32
self.shape = (parent.shape[1], parent.shape[0])
+ try:
+ self.T = self.parent
+ except AttributeError:
+ # Scipy >= 0.16 defines self.T using self._transpose()
+ pass
def _matvec(self, s):
return self.parent.rmatvec(s)
@@ -204,6 +209,9 @@ class OpTomoTranspose(scipy.sparse.linalg.LinearOperator):
def rmatvec(self, v):
return self.parent.matvec(v)
+ def _transpose(self):
+ return self.parent
+
def __mul__(self,s):
# Catch the case of a backprojection of 2D/3D data
if isinstance(s, np.ndarray) and s.shape==self.parent.sshape: