提交 0acd3f29 authored 作者: Frederic Bastien's avatar Frederic Bastien

Added theano.tensor.bitwise_{and,or,xor,not}. They are the numpy name.

The just point to the existing implementation.
上级 b64f1ddf
......@@ -2143,18 +2143,23 @@ def switch(cond, ift, iff):
@_scal_elemwise_with_nfunc('bitwise_and', 2, 1)
def and_(a,b):
"""bitwise a & b"""
bitwise_and = and_ # numpy name for it
@_scal_elemwise_with_nfunc('bitwise_or', 2, 1)
def or_(a,b):
"""bitwise a | b"""
bitwise_or = or_ # numpy name for it
@_scal_elemwise_with_nfunc('bitwise_xor', 2, 1)
def xor(a,b):
"""bitwise a ^ b"""
bitwise_xor = xor # numpy name for it
@_scal_elemwise_with_nfunc('invert', 1, 1)
def invert(a):
"""bitwise ~a"""
bitwise_not = invert # numpy alias for it
##########################
# Math
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论