mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 20:13:41 +02:00
feat: linalg.jack_matmul now also works with non Obs valued matrices.
This commit is contained in:
parent
28bf0f1701
commit
976d9c3f29
2 changed files with 40 additions and 11 deletions
|
@ -205,7 +205,10 @@ def jack_matmul(*operands):
|
|||
|
||||
r = _exp_to_jack(operands[0])
|
||||
for op in operands[1:]:
|
||||
r = r @ _exp_to_jack(op)
|
||||
if isinstance(op[0, 0], CObs):
|
||||
r = r @ _exp_to_jack(op)
|
||||
else:
|
||||
r = r @ op
|
||||
return _imp_from_jack(r)
|
||||
else:
|
||||
name = operands[0][0, 0].names[0]
|
||||
|
@ -225,7 +228,10 @@ def jack_matmul(*operands):
|
|||
|
||||
r = _exp_to_jack(operands[0])
|
||||
for op in operands[1:]:
|
||||
r = r @ _exp_to_jack(op)
|
||||
if isinstance(op[0, 0], Obs):
|
||||
r = r @ _exp_to_jack(op)
|
||||
else:
|
||||
r = r @ op
|
||||
return _imp_from_jack(r)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue