Skip to content

【Paddle Tensor No.21】docs: Add docs for Tensor.bitwise_invert #6932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 11, 2024
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
9 changes: 9 additions & 0 deletions docs/api/paddle/Tensor_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,15 @@ bitwise_not(out=None, name=None)

请参考 :ref:`cn_api_paddle_bitwise_not`

bitwise_invert(out=None, name=None)
:::::::::

返回:按位取反运算后的结果

返回类型:Tensor

请参考 :ref:`cn_api_paddle_bitwise_invert`

bitwise_or(y, out=None, name=None)
:::::::::

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

bitwise_invert
-------------------------------

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

对 Tensor ``x`` 逐元素进行 ``按位取反`` 运算。

.. math::
Out = \sim X

.. note::
``bitwise_invert`` 和 ``bitwise_not`` 执行相同的操作,功能等效。

参数
::::::::::::

- **x** (Tensor)- 输入的 N-D `Tensor`,数据类型为:bool,uint8,int8,int16,int32,int64。
- **out** (Tensor,可选)- 输出的结果 `Tensor`,是与输入数据类型相同的 N-D `Tensor`。默认值为 None,此时将创建新的 Tensor 来保存输出结果。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
::::::::::::
``按位取反`` 运算后的结果 ``Tensor``,数据类型与 ``x`` 相同。

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

COPY-FROM: paddle.bitwise_invert