mindspore.mint.atan2
====================

.. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg
    :target: https://gitee.com/mindspore/mindspore/blob/master/docs/api/api_python/mint/mindspore.mint.func_atan2.rst
    :alt: 查看源文件


.. py:function:: mindspore.mint.atan2(input, other)

    逐元素计算input/other的反正切值。

    返回 :math:`\theta\ \in\ [-\pi, \pi]` ,使得 :math:`input = r*\sin(\theta), other = r*\cos(\theta)` ,其中 :math:`r = \sqrt{input^2 + other^2}` 。

    .. note::
        - 参数 `input` 和 `other` 遵循隐式类型转换规则,使数据类型保持一致。如果两参数数据类型不一致,则低精度类型会被转换成较高精度类型。

    参数:
        - **input** (Tensor, Number.number) - 输入Tensor或常数。
        - **other** (Tensor, Number.number) - 输入Tensor或常数,shape与 `input` 相同,或能与 `input` 的shape广播。

    返回:
        Tensor,与广播后的输入shape相同。
        当输入类型为bool、int8、uint8、int16、int32、int64时,返回值类型为float32。
        否则,返回值类型与输入类型相同。

    异常:
        - **TypeError** - `input` 或 `other` 不是Tensor或常数。
        - **RuntimeError** - `input` 与 `other` 之间的数据类型转换不被支持。