From c848dd8427f743f8d2fd9290ddd1c0ec4f008ac8 Mon Sep 17 00:00:00 2001 From: Matthew Plough Date: Fri, 18 Aug 2023 14:29:51 -0400 Subject: [PATCH] Fix transpose issue identified by jcapriot --- pymatsolver/mumps/_init_.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pymatsolver/mumps/_init_.py b/pymatsolver/mumps/_init_.py index 98a40f8..7e29537 100644 --- a/pymatsolver/mumps/_init_.py +++ b/pymatsolver/mumps/_init_.py @@ -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) @@ -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):