chainerx.arctan2

chainerx.arctan2(x1, x2)

Element-wise arc tangent of \(\frac{x_1}{x_2}\) choosing the quadrant correctly.

Parameters
Returns

Returns an array where each element represents \(\theta\) in the range \([-\pi, \pi]\), such that \(x_1 = r \sin(\theta)\) and \(x_2 = r \cos(\theta)\) for some \(r > 0\).

Return type

ndarray

Note

During backpropagation, this function propagates the gradient of the output array to the input array x1 and/or x2.

See also

numpy.arctan2