Commit 7a74a21e authored by Philipp Arras's avatar Philipp Arras
Browse files


parent 0f7e847e
Pipeline #88487 passed with stages
in 11 minutes and 20 seconds
......@@ -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")
Markdown is supported
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