mindspore.ops.coo_isinf ======================== .. 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/ops/mindspore.ops.func_coo_isinf.rst :alt: 查看源文件 .. py:function:: mindspore.ops.coo_isinf(x: COOTensor) 确定输入COOTensor每个位置上的元素是否为正负无穷大。 .. math:: out_i = \begin{cases} & \text{ if } x_{i} = \text{Inf},\ \ True \\ & \text{ if } x_{i} \ne \text{Inf},\ \ False \end{cases} 其中 :math:`Inf` 表示正负无穷大。 参数: - **x** (COOTensor) - 任意维度的COOTensor。 返回: COOTensor,shape与相同的输入,数据的类型为bool。 异常: - **TypeError** - 如果 `x` 不是COOTensor。