numpy.absolute

numpy.absolute(x[, out]) = <ufunc 'absolute'>

Calculate the absolute value element-wise.

Parameters :

x : array_like

Input array.

Returns :

absolute : ndarray

An ndarray containing the absolute value of each element in x. For complex input, a + ib, the absolute value is \sqrt{ a^2 + b^2 }.

Examples

Previous topic

numpy.square

Next topic

numpy.fabs

This Page