Skip to content

Commit

Permalink
Add docstring to linop property of InverseLinearOperator:
Browse files Browse the repository at this point in the history
The text clarifies that replacing the original linear operator through
the setter is a dangerous operation which should only be made in extreme
cases.
  • Loading branch information
yguclu committed Jan 30, 2024
1 parent 87727ac commit 54f4671
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions psydac/linalg/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,16 @@ def dtype(self):

@property
def linop(self):
"""
The linear operator L of which this object is the inverse L^{-1}.
The linear operator L can be modified in place, or replaced entirely
through the setter. A substitution should only be made in cases where
no other options are viable, as it breaks the one-to-one map between
the original linear operator L (passed to the constructor) and the
current `InverseLinearOperator` object L^{-1}. Use with extreme care!
"""
return self._A

@linop.setter
Expand Down

0 comments on commit 54f4671

Please sign in to comment.