NumpyTensorSpace._inner¶
-
NumpyTensorSpace.
_inner
(self, x1, x2)[source]¶ Return the inner product of
x1
andx2
.This function is part of the subclassing API. Do not call it directly.
- Parameters
- x1, x2
NumpyTensor
Elements whose inner product is calculated.
- x1, x2
- Returns
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