This is documentation for an old release of NumPy (version 1.3.). Read this page Search for this page in the documentation of the latest stable release (version > 1.17).
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])