Added SimPEGLinearOperator which has transpose functionality.

Changed ComplexMap to use this operator.
This commit is contained in:
rowanc1
2014-04-30 11:48:10 -07:00
parent c2032c3f31
commit 6adcce86c8
2 changed files with 30 additions and 13 deletions
+11
View File
@@ -330,3 +330,14 @@ def invPropertyTensor(M, tensor, returnMatrix=False):
return makePropertyTensor(M, T)
return T
from scipy.sparse.linalg import LinearOperator
class SimPEGLinearOperator(LinearOperator):
"""Extends scipy.sparse.linalg.LinearOperator to have a .T function."""
@property
def T(self):
return self.__class__((self.shape[1],self.shape[0]),self.rmatvec,rmatvec=self.matvec,matmat=self.matmat)