Skip to content
Snippets Groups Projects
Commit 7a74a21e authored by Philipp Arras's avatar Philipp Arras
Browse files

Fixup

parent 0f7e847e
No related branches found
No related tags found
2 merge requests!589Fixup get_sqrt(),!583Restructure tensors
Pipeline #88487 passed
......@@ -59,6 +59,8 @@ class SandwichOperator(EndomorphicOperator):
if not isinstance(bun, LinearOperator):
raise TypeError("bun must be a linear operator")
if isinstance(bun, ScalingOperator):
if cheese is None:
return bun @ bun
return cheese.scale(abs(bun._factor)**2)
if cheese is not None and not isinstance(cheese, LinearOperator):
raise TypeError("cheese must be a linear operator or None")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment