npy_weighted_inner

odl.space.npy_tensors.npy_weighted_inner(weights)[source]

Weighted inner product on TensorSpace's as free function.

Parameters:
weightsscalar or array-like

Weights of the inner product. A scalar is interpreted as a constant weight, a 1-dim. array as a weighting vector.

Returns:
innercallable

Inner product function with given weight. Constant weightings are applicable to spaces of any size, for arrays the sizes of the weighting and the space must match.