scipp.acos#

scipp.acos(x, *, out=None)#

Element-wise inverse cosine.

The input must be dimensionless and in the range [-1, 1].

Parameters:
Returns:

Same type as input – The inverse cosine values of the input in radians.

Examples

Compute the inverse cosine:

>>> import scipp as sc
>>> x = sc.array(dims=['x'], values=[1.0, 0.5, 0.0])
>>> sc.acos(x)
<scipp.Variable> (x: 3)    float64            [rad]  [0, 1.0472, 1.5708]

The output is in radians, which can be converted to degrees:

>>> sc.acos(sc.scalar(0.5)).to(unit='deg')
<scipp.Variable> ()    float64            [deg]  60