scipp.sin#
- scipp.sin(x, *, out=None)#
Element-wise sine.
The input must have a plane-angle unit, i.e.
rad,deg.- Parameters:
- Returns:
Same type as input– The sine values of the input.
Examples
Compute sine of angles in radians:
>>> import scipp as sc >>> import numpy as np >>> angle = sc.array(dims=['x'], values=[0.0, np.pi/6, np.pi/4, np.pi/3, np.pi/2], unit='rad') >>> sc.sin(angle) <scipp.Variable> (x: 5) float64 [dimensionless] [0, 0.5, ..., 0.866025, 1]
The input must have angle units (rad or deg):
>>> angle_deg = sc.array(dims=['x'], values=[0.0, 30.0, 45.0, 60.0, 90.0], unit='deg') >>> sc.sin(angle_deg) <scipp.Variable> (x: 5) float64 [dimensionless] [0, 0.5, ..., 0.866025, 1]