ZeroOperator¶
- class odl.operator.default_ops.ZeroOperator(*args, **kwargs)[source]¶
Bases:
Operator
Operator mapping each element to the zero element.
Implements:
ZeroOperator(space)(x) == space.zero()
- Attributes:
Methods
__call__
(x[, out])Return
self(x[, out, **kwargs])
.derivative
(point)Return the operator derivative at
point
.norm
([estimate])Return the operator norm of this operator.
- __init__(domain, range=None)[source]¶
Initialize a new instance.
- Parameters:
- domain
LinearSpace
Domain of the operator.
- range
LinearSpace
, optional Range of the operator. Default:
domain
- domain
Examples
>>> op = odl.ZeroOperator(odl.rn(3)) >>> op([1, 2, 3]) rn(3).element([ 0., 0., 0.])
Also works with domain != range:
>>> op = odl.ZeroOperator(odl.rn(3), odl.cn(4)) >>> op([1, 2, 3]) cn(4).element([ 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j])