提交 cf62c5c5 authored 作者: Frederic's avatar Frederic

numpy dtype are correctly compared again string.

Speed up. get_scalar_constant_value and slow scan test.
上级 011f4a4c
......@@ -861,7 +861,7 @@ class Elemwise(OpenMPOp):
variables = [variables]
for variable, storage, nout in izip(variables, output_storage,
node.outputs):
if str(getattr(variable, "dtype", "")) == 'object':
if getattr(variable, "dtype", "") == 'object':
# Since numpy 1.6, function created with numpy.frompyfunc
# always return an ndarray with dtype object
variable = numpy.asarray(variable, dtype=nout.dtype)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论