mindspore.mint.fmod
=====================

.. 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_fmod.rst
    :alt: 查看源文件


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

    计算除法运算 input/other 的浮点余数。

    .. math::
        out = input - n * other

    其中 :math:`n` 是 :math:`input/other` 结果中的整数部分。
    返回值的符号和 `input` 相同,在数值上小于 `other` 。

    .. warning::
        这是一个实验性API,后续可能修改或删除。

    参数:
        - **input** (Tensor) - 被除数。
        - **other** (Union[Tensor, Number]) - 除数。

    返回:
        Tensor,输出的shape与广播后的shape相同,数据类型取两个输入中精度较高或数字较高的。

    异常:
        - **TypeError** - `input` 不是Tensor。