Skip to content

Commit

Permalink
[NumpyMatrixOperator] implement as_array methods for sparse matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrave authored and renefritze committed Nov 3, 2020
1 parent 1bc36e7 commit 29f8baa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pymor/operators/numpy.py
Expand Up @@ -221,12 +221,12 @@ def assemble(self, mu=None):

def as_range_array(self, mu=None):
if self.sparse:
raise NotImplementedError
return Operator.as_range_array(self)
return self.range.from_numpy(self.matrix.T.copy())

def as_source_array(self, mu=None):
if self.sparse:
raise NotImplementedError
return Operator.as_source_array(self)
return self.source.from_numpy(self.matrix.copy()).conj()

def apply(self, U, mu=None):
Expand Down

0 comments on commit 29f8baa

Please sign in to comment.