mindspore.ops.coo_neg ====================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/br_base/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/br_base/docs/api/api_python/ops/mindspore.ops.func_coo_neg.rst :alt: 查看源文件 .. py:function:: mindspore.ops.coo_neg(x: COOTensor) 计算输入COOTensor的相反数并返回。 .. math:: out_{i} = - x_{i} 参数: - **x** (COOTensor) - Neg的输入,数据类型为数值型。 返回: COOTensor,shape和数据类型与输入 `x` 相同。 异常: - **TypeError** - `x` 不是COOTensor。