OperatorLeftScalarMult

class odl.OperatorLeftScalarMult(*args, **kwargs)

Bases: Operator

Expression type for the operator left scalar multiplication.

OperatorLeftScalarMult(op, s)(x) == s * op(x)

The scalar multiplication is well-defined only if op.range is a LinearSpace.

__init__(operator, scalar)[source]

Initialize a new OperatorLeftScalarMult instance.

Parameters

operatorOperator

Operator in the scalar multiplication. Its range must be a LinearSpace or Field.

scalaroperator.range.field element

A real or complex number, depending on the field of the range.

Examples

>>> space = odl.rn(3)
>>> operator = odl.IdentityOperator(space)
>>> left_mul_op = OperatorLeftScalarMult(operator, 3)
>>> left_mul_op([1, 2, 3])
rn(3).element([ 3.,  6.,  9.])