ZeroOperator¶
-
class
odl.operator.default_ops.
ZeroOperator
(*args, **kwargs)[source]¶ Bases:
odl.operator.operator.Operator
Operator mapping each element to the zero element.
Implements:
ZeroOperator(space)(x) == space.zero()
- Attributes
Methods
_call
(self, x[, out])Return the zero vector or assign it to
out
.derivative
(self, point)Return the operator derivative at
point
.norm
(self[, estimate])Return the operator norm of this operator.
-
__init__
(self, 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])