提交 2e2a1cb5 authored 作者: abergeron's avatar abergeron

Merge pull request #1803 from nouiz/dtype_fix

Fix bug introduced by gh-1794 merged 7 days ago.
......@@ -874,7 +874,10 @@ class Elemwise(OpenMPOp):
odat[...] = variable
storage[0] = odat
# Sometimes NumPy return a Python type.
elif not isinstance(variable, numpy.ndarray):
# Some Theano op return a different dtype like floor, ceil,
# trunc, eq, ...
elif (not isinstance(variable, numpy.ndarray) or
variable.dtype != nout.dtype):
variable = numpy.asarray(variable, nout.dtype)
storage[0] = variable
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论