sin¶
-
sin(x, out=None, **kwargs)¶ Trigonometric sine, element-wise.
Parameters: - x : ndarray or scalar
Angle, in radians (\(2 \pi\) rad equals 360 degrees).
- out : ndarray or None
A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. The dtype of the output is the same as that of the input if the input is an ndarray.
Returns: - y : ndarray or scalar
The sine of each element of x. This is a scalar if x is a scalar.
- Notes
- This function only supports input type of float.
Examples
>>> np.sin(np.pi/2.) 1.0 >>> np.sin(np.array((0., 30., 45., 60., 90.)) * np.pi / 180.) array([0. , 0.5 , 0.70710677, 0.86602545, 1. ])