NumpyTensorSpace._inner

NumpyTensorSpace._inner(self, x1, x2)[source]

Return the inner product of x1 and x2.

This function is part of the subclassing API. Do not call it directly.

Parameters
x1, x2NumpyTensor

Elements whose inner product is calculated.

Returns
innerfield element

Inner product of the elements.

Examples

>>> space = odl.rn(3)
>>> x = space.element([1, 0, 3])
>>> y = space.one()
>>> space.inner(x, y)
4.0

Weighting is supported, too:

>>> space_w = odl.rn(3, weighting=[2, 1, 1])
>>> x = space_w.element([1, 0, 3])
>>> y = space_w.one()
>>> space_w.inner(x, y)
5.0