mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-31 12:40:46 +08:00
Added SimPEGLinearOperator which has transpose functionality.
Changed ComplexMap to use this operator.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user