FlatteningOperator
- class odl.FlatteningOperator(*args, **kwargs)
Bases:
OperatorOperator that reshapes the object as a column vector.
The operation performed by this operator is
FlatteningOperator(x) == ravel(x)
The range of this operator is always a
TensorSpace, i.e., even if the domain is a discrete function space.- __init__(domain)[source]
Initialize a new instance.
Parameters
- domain
TensorSpace Set of elements on which this operator acts.
Examples
>>> space = odl.uniform_discr([-1, -1], [1, 1], shape=(2, 3)) >>> op = odl.FlatteningOperator(space) >>> op.range rn(6) >>> x = space.element([[1, 2, 3], ... [4, 5, 6]]) >>> op(x) rn(6).element([ 1., 2., 3., 4., 5., 6.])
- domain