Binary operations#
Note
The bitwise operators take an integer as an input.
bitwise a & b Generalizes a scalar |
|
bitwise a | b Generalizes a scalar |
|
bitwise a ^ b Generalizes a scalar |
|
bitwise ~a Generalizes a scalar |
|
bitwise ~a Generalizes a scalar |
>>> a, b = at.itensor3(), at.itensor3() # example inputs
>>> a & b # at.and_(a,b) bitwise and (alias at.bitwise_and)
>>> a ^ 1 # at.xor(a,1) bitwise xor (alias at.bitwise_xor)
>>> a | b # at.or_(a,b) bitwise or (alias at.bitwise_or)
>>> ~a # at.invert(a) bitwise invert (alias at.bitwise_not)