Skip to content
fn

atan

→Tensor
atan(input: Tensor)

Implementing kernel

C++ engine symbols that back this Python API.

Element-wise inverse tangent in radians.

Alias of arctan. Returns values in (−π/2,π/2)(-\pi/2, \pi/2).

Parameters

inputTensor
Input tensor.

Returns

Tensor

Element-wise result with the same shape as input.

Notes

Mathematical definition:

outi=arctan⁡(inputi)\text{out}_i = \arctan(\text{input}_i)

Gradient: 1/(1+x2)1 / (1 + x^{2}).

Examples

>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 3.0])
>>> lucid.atan(x)
Tensor([...])