Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/api/paddle/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ tensor 逻辑操作
" :ref:`paddle.isfinite <cn_api_paddle_isfinite>` ", "返回输入 tensor 的每一个值是否为 Finite(既非 +/-INF 也非 +/-NaN )"
" :ref:`paddle.isinf <cn_api_paddle_isinf>` ", "返回输入 tensor 的每一个值是否为 +/-INF"
" :ref:`paddle.isnan <cn_api_paddle_isnan>` ", "返回输入 tensor 的每一个值是否为 +/-NaN"
" :ref:`paddle.isposinf <cn_api_paddle_isposinf>` ", "返回输入 tensor 的每一个值是否为 +INF"
" :ref:`paddle.isneginf <cn_api_paddle_isneginf>` ", "返回输入 tensor 的每一个值是否为 -INF"
" :ref:`paddle.isreal <cn_api_paddle_isreal>` ", "返回输入 tensor 的每一个值是否为实数类型"

.. _tensor_attribute:

Expand Down
3 changes: 3 additions & 0 deletions docs/api/paddle/Tensor/Overview_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ Methods
isfinite
isinf
isnan
isneginf
isposinf
isreal
item
kron
less_equal
Expand Down
27 changes: 27 additions & 0 deletions docs/api/paddle/Tensor_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,33 @@ isnan(name=None)

请参考 :ref:`cn_api_paddle_isnan`

isposinf(name=None)
:::::::::

返回:计算后的 Tensor

返回类型:Tensor

请参考 :ref:`cn_api_paddle_isposinf`

isneginf(name=None)
:::::::::

返回:计算后的 Tensor

返回类型:Tensor

请参考 :ref:`cn_api_paddle_isneginf`

isreal(name=None)
:::::::::

返回:计算后的 Tensor

返回类型:Tensor

请参考 :ref:`cn_api_paddle_isreal`

kthvalue(k, axis=None, keepdim=False, name=None)
:::::::::

Expand Down
22 changes: 22 additions & 0 deletions docs/api/paddle/isneginf_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _cn_api_paddle_isneginf:

isneginf
-----------------------------

.. py:function:: paddle.isneginf(x, name=None)

返回输入 tensor 的每一个值是否为 `-INF` 。

参数
:::::::::
- **x** (Tensor):输入的 `Tensor`,数据类型为:float16、float32、float64、int8、int16、int32、int64、uint8。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
:::::::::
``Tensor``,每个元素是一个 bool 值,表示输入 `x` 的每个元素是否为 `-INF` 。

代码示例
:::::::::

COPY-FROM: paddle.isneginf
22 changes: 22 additions & 0 deletions docs/api/paddle/isposinf_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _cn_api_paddle_isposinf:

isposinf
-----------------------------

.. py:function:: paddle.isposinf(x, name=None)

返回输入 tensor 的每一个值是否为 `+INF` 。

参数
:::::::::
- **x** (Tensor):输入的 `Tensor`,数据类型为:float16、float32、float64、int8、int16、int32、int64、uint8。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
:::::::::
``Tensor``,每个元素是一个 bool 值,表示输入 `x` 的每个元素是否为 `+INF` 。

代码示例
:::::::::

COPY-FROM: paddle.isposinf
24 changes: 24 additions & 0 deletions docs/api/paddle/isreal_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. _cn_api_paddle_isreal:

isreal
-------------------------------

.. py:function:: paddle.isreal(x, name=None)


判断输入 tensor 的每一个值是否为实数类型(非 complex64 或者 complex128)。

参数
:::::::::
- **x** (Tensor) - 输入 Tensor。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
:::::::::
``Tensor``,每个元素是一个 bool 值,表示输入 `x` 的每个元素是否为实数类型。


代码示例
:::::::::

COPY-FROM: paddle.isreal