TensorSpace._divide
- TensorSpace._divide(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, x2
NumpyTensor Dividend and divisor in the quotient.
- out
NumpyTensor 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.]) >>> out rn(3).element([ 2., 0., 2.]) >>> out.data is result.data True >>> out = np.zeros((3)) >>> result = np.divide([2,0,4], [1,1,2], out=out) >>> result is out True
- x1, x2