FlatteningOperator.inverse

property FlatteningOperator.inverse

Operator that reshapes to original shape.

Examples

>>> space = odl.uniform_discr([-1, -1], [1, 1], shape=(2, 4))
>>> op = odl.FlatteningOperator(space)
>>> y = op.range.element([1, 2, 3, 4, 5, 6, 7, 8])
>>> op.inverse(y)
uniform_discr([-1., -1.], [ 1.,  1.], (2, 4)).element(
    [[ 1.,  2.,  3.,  4.],
     [ 5.,  6.,  7.,  8.]]
)
>>> op = odl.FlatteningOperator(space, order='F')
>>> op.inverse(y)
uniform_discr([-1., -1.], [ 1.,  1.], (2, 4)).element(
    [[ 1.,  3.,  5.,  7.],
     [ 2.,  4.,  6.,  8.]]
)
>>> op(op.inverse(y)) == y
True