numpy.reciprocal

numpy.reciprocal(x[, out])

Return element-wise reciprocal.

Parameters:

x : array_like

Input value.

Returns:

y : ndarray

Return value.

Examples

>>> reciprocal(2.)
0.5
>>> reciprocal([1, 2., 3.33])
array([ 1.       ,  0.5      ,  0.3003003])

Previous topic

numpy.add

Next topic

numpy.negative

This Page

Quick search