sign_op.__call__

sign_op.__call__(self, x, out=None, \*\*kwargs)

Return self(x[, out, **kwargs]).

Implementation of the call pattern op(x) with the private _call() method and added error checking.

Parameters
xdomain element-like

An object which can be converted into an element of this operator’s domain with the self.domain.element method. The operator is applied to this object, which is treated as immutable, hence it is not modified during evaluation.

outrange element, 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
outrange element

Result of the operator evaluation. If out was provided, the returned object is a reference to it.

See also

_call

Implementation of the method

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.])