mindspore.ops.coo_square
=========================

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


.. py:function:: mindspore.ops.coo_square(x: COOTensor)

    逐元素返回COOTensor的平方。

    .. math::
        out_{i} = (x_{i})^2

    参数:
        - **x** (COOTensor) - 输入COOTensor的类型为数值类型。

    返回:
        COOTensor,具有与当前COOTensor相同的数据类型和shape。

    异常:
        - **TypeError** - `x` 不是COOTensor。