Operator.__call__
- Operator.__call__(x, out=None, **kwargs)[source]
Return
self(x[, out, **kwargs]).Implementation of the call pattern
op(x)with the private_call()method and added error checking.Parameters
- x
domainelement-like An object which can be converted into an element of this operator’s domain with the
self.domain.elementmethod. The operator is applied to this object, which is treated as immutable, hence it is not modified during evaluation.- out
rangeelement, optional An object in the operator range to which the result of the operator evaluation is written. The result is independent of the initial state of this object.
- kwargs :
Passed on to the underlying implementation in
_call.
Returns
- out
rangeelement Result of the operator evaluation. If
outwas provided, the returned object is a reference to it.
Examples
>>> rn = odl.rn(3) >>> op = odl.ScalingOperator(rn, 2.0) >>> x = rn.element([1, 2, 3])
Out-of-place evaluation:
>>> op(x) rn(3).element([ 2., 4., 6.])
In-place evaluation:
>>> y = rn.element() >>> op(x, out=y) rn(3).element([ 2., 4., 6.]) >>> y rn(3).element([ 2., 4., 6.])
See Also
_call : Implementation of the method
- x