NumpyTensorSpace._multiply

NumpyTensorSpace._multiply(self, x1, x2, out)[source]

Compute the entry-wise product out = x1 * x2.

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

Parameters
x1, x2NumpyTensor

Factors in the product.

outNumpyTensor

Element to which the result is written.

Examples

>>> space = odl.rn(3)
>>> x = space.element([1, 0, 3])
>>> y = space.element([-1, 1, -1])
>>> space.multiply(x, y)
rn(3).element([-1.,  0., -3.])
>>> out = space.element()
>>> result = space.multiply(x, y, out=out)
>>> result
rn(3).element([-1.,  0., -3.])
>>> result is out
True