Skip to content

Commit

Permalink
Fix transpose issue identified by jcapriot
Browse files Browse the repository at this point in the history
  • Loading branch information
mplough-kobold committed Aug 18, 2023
1 parent 4836604 commit c848dd8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pymatsolver/mumps/_init_.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ class Mumps(Base):

@property
def T(self):
"""Transpose operator.
Allows solving A^T * x = b without needing to factor again.
"""
properties_with_setters = []
for a in dir(self.__class__):
attr = getattr(self.__class__, a)
Expand All @@ -154,9 +158,11 @@ def T(self):
kwargs = {attr: getattr(self, attr) for attr in properties_with_setters}

newMS = self.__class__(
self.A.T,
self.A,
from_pointer=self.pointer,
**kwargs,
)
newMS.transpose = not self.transpose
return newMS

def __init__(self, A, from_pointer=None, **kwargs):
Expand Down

0 comments on commit c848dd8

Please sign in to comment.