Commit 951f490f authored by Philipp Arras's avatar Philipp Arras
Browse files

Allow operator composition via __call__

parent aca4d4b4
Pipeline #71070 passed with stages
in 27 minutes and 45 seconds
......@@ -198,7 +198,7 @@ class Operator(metaclass=NiftyMeta):
return self.apply(x.trivial_jac()).prepend_jac(x.jac)
elif isinstance(x, (Field, MultiField)):
return self.apply(x)
raise TypeError('Operator can only consume Field, MultiFields and Linearizations')
return self @ x
def ducktape(self, name):
from .simple_linear_operators import ducktape
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