提交 ca6265bb authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Remove redundant method I forgot to delete.

上级 41747183
...@@ -1648,18 +1648,6 @@ class ProdWithoutZeros(CAReduceDtype): ...@@ -1648,18 +1648,6 @@ class ProdWithoutZeros(CAReduceDtype):
def __init__(self, axis=None, dtype=None): def __init__(self, axis=None, dtype=None):
CAReduceDtype.__init__(self, mul_without_zeros, axis=axis, dtype=dtype) CAReduceDtype.__init__(self, mul_without_zeros, axis=axis, dtype=dtype)
def make_node(self, input):
# We need to redefine make_node so that, if self.dtype is None,
# we can infer what dtype should be, and create a node from an Op
# of the appropriate dtype.
dtype = self._output_dtype(input.dtype)
if dtype == self.dtype:
# Don't build another instance
op = self
else:
op = self.__class__(axis=self.axis, dtype=dtype)
return CAReduce.make_node(op, input)
def __str__(self): def __str__(self):
if self.axis is None: if self.axis is None:
return "ProdWithoutZeros" return "ProdWithoutZeros"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论