提交 2cc96c35 authored 作者: James Bergstra's avatar James Bergstra

pep8

上级 3fc5ab9e
...@@ -4977,7 +4977,7 @@ class AdvancedIncSubtensor1(Op): ...@@ -4977,7 +4977,7 @@ class AdvancedIncSubtensor1(Op):
gx = g_output gx = g_output
gy = advanced_subtensor1(g_output, *idx_list) gy = advanced_subtensor1(g_output, *idx_list)
return [gx, gy] + [None]*len(idx_list) return [gx, gy] + [None] * len(idx_list)
advanced_inc_subtensor1 = AdvancedIncSubtensor1() advanced_inc_subtensor1 = AdvancedIncSubtensor1()
......
...@@ -732,7 +732,7 @@ class Elemwise(Op): ...@@ -732,7 +732,7 @@ class Elemwise(Op):
# Since numpy 1.6, function created with numpy.frompyfunc # Since numpy 1.6, function created with numpy.frompyfunc
# always return an ndarray with dtype object # always return an ndarray with dtype object
variable = numpy.asarray(variable, dtype=nout.dtype) variable = numpy.asarray(variable, dtype=nout.dtype)
if hasattr(variable,'shape') and storage[0].shape != variable.shape: if hasattr(variable, 'shape') and storage[0].shape != variable.shape:
if numpy.prod(variable.shape) == 0: if numpy.prod(variable.shape) == 0:
# numpy don't resize from a shape (1,5) to (0,5) # numpy don't resize from a shape (1,5) to (0,5)
# This bypass the inplace... But I it is important in this case. # This bypass the inplace... But I it is important in this case.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论