提交 9d887ad2 authored 作者: Chinnadhurai Sankar's avatar Chinnadhurai Sankar 提交者: Pascal Lamblin

Change theano bitwise_and identity from -1 to 1 & fix division error in py3.4

上级 cbafa4e6
......@@ -34,7 +34,7 @@ oscillates due to the box function being shifted to the middle of the array.
N = 1024
box = np.zeros((1, N), dtype='float64')
box[:, N/2-10: N/2+10] = 1
box[:, N//2-10: N//2+10] = 1
out = f_rfft(box)
c_out = np.asarray(out[0, :, 0] + 1j*out[0, :, 1])
......
......@@ -1543,7 +1543,7 @@ xor = XOR()
class AND(BinaryBitOp):
identity = 1
identity = -1
commutative = True
associative = True
nfunc_spec = ('bitwise_and', 2, 1)
......@@ -1555,6 +1555,9 @@ class AND(BinaryBitOp):
(x, y) = inputs
(z,) = outputs
return "%(z)s = (%(x)s & %(y)s);" % locals()
def c_code_cache_version(self):
return (2,)
and_ = AND()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论