NumpyTensorSpace._divide

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

Compute the entry-wise quotient x1 / x2.

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

Parameters
x1, x2NumpyTensor

Dividend and divisor in the quotient.

outNumpyTensor

Element to which the result is written.

Examples

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