numpy.cos

numpy.cos(x[, out])

Cosine elementwise.

Parameters:

x : array_like

Input array in radians.

Returns:

out : ndarray

Output array of same shape as x.

Examples

>>> np.cos(np.array([0, np.pi/2, np.pi]))
array([  1.00000000e+00,   6.12303177e-17,  -1.00000000e+00])

Previous topic

numpy.sin

Next topic

numpy.tan

This Page

Quick search