提交 392c2a74 authored 作者: Frederic Bastien's avatar Frederic Bastien

documented the new bitwise_{and,or,xor,not} alias that are the names used by numpy.

上级 8d2e3c65
...@@ -757,10 +757,10 @@ Arithmetic ...@@ -757,10 +757,10 @@ Arithmetic
Bitwise Bitwise
------------- -------------
>>> a & b # T.and_(a,b) bitwise and >>> a & b # T.and_(a,b) bitwise and (alias T.bitwise_and)
>>> a ^ 1 # T.xor(a,1) bitwise xor >>> a ^ 1 # T.xor(a,1) bitwise xor (alias T.bitwise_xor)
>>> a | b # T.or_(a,b) bitwise or >>> a | b # T.or_(a,b) bitwise or (alias T.bitwise_or)
>>> ~a # T.invert(a) bitwise invert >>> ~a # T.invert(a) bitwise invert (alias T.bitwise_not)
Inplace Inplace
------------- -------------
...@@ -922,6 +922,22 @@ The bitwise operators possess this interface: ...@@ -922,6 +922,22 @@ The bitwise operators possess this interface:
Returns a variable representing the result of the bitwise not. Returns a variable representing the result of the bitwise not.
.. function:: bitwise_and(a, b)
Alias for and_. bitwise_and is the numpy name.
.. function:: bitwise_or(a, b)
Alias for or_. bitwise_or is the numpy name.
.. function:: bitwise_xor(a, b)
Alias for xor_. bitwise_xor is the numpy name.
.. function:: bitwise_not(a, b)
Alias for invert. invert is the numpy name.
Here is an example using the bit-wise ``and_`` via the ``&`` operator: Here is an example using the bit-wise ``and_`` via the ``&`` operator:
.. code-block:: python .. code-block:: python
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论