Commit e8595a72 authored by Lukas Platz's avatar Lukas Platz
Browse files

fix adjoint subscript computation for pure transpose operations

parent 7f012ec2
......@@ -262,8 +262,11 @@ class LinearEinsum(LinearOperator):
iss, oss, *_ = subscripts.split("->")
iss_spl = iss.split(",")
adj_iss = ",".join((",".join(iss_spl[:-1]), oss))
self._adj_sscr = "->".join((adj_iss, iss_spl[-1]))
if len(iss_spl) == 1:
self._adj_sscr = "->".join((oss, iss))
else:
adj_iss = ",".join((",".join(iss_spl[:-1]), oss))
self._adj_sscr = "->".join((adj_iss, iss_spl[-1]))
self._capability = self.TIMES | self.ADJOINT_TIMES
def apply(self, x, mode):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment