scipp.atan#

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

Element-wise inverse tangent.

The input must be dimensionless.

Parameters:
Returns:

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

See also

scipp.atan2

Two-argument inverse tangent for determining the correct quadrant.

Examples

Compute the inverse tangent:

>>> import scipp as sc
>>> x = sc.array(dims=['x'], values=[0.0, 1.0, -1.0])
>>> sc.atan(x)
<scipp.Variable> (x: 3)    float64            [rad]  [0, 0.785398, -0.785398]

The output is in radians in the range [-π/2, π/2]:

>>> sc.atan(sc.scalar(1.0)).to(unit='deg')
<scipp.Variable> ()    float64            [deg]  45