提交 3514f73c authored 作者: David Warde-Farley's avatar David Warde-Farley

Use previously defined python_all.

上级 732f8bcb
...@@ -4762,7 +4762,7 @@ def tile(x, reps, ndim=None): ...@@ -4762,7 +4762,7 @@ def tile(x, reps, ndim=None):
tile.op = {} tile.op = {}
try: try:
assert builtin_all([int(i) == i for i in iter(reps)]) assert python_all([int(i) == i for i in iter(reps)])
except (TypeError, AssertionError): except (TypeError, AssertionError):
raise ValueError("reps argument to tile must be a constant (e.g. " raise ValueError("reps argument to tile must be a constant (e.g. "
"tuple, list of integers)") "tuple, list of integers)")
...@@ -5682,15 +5682,9 @@ def outer(x, y): ...@@ -5682,15 +5682,9 @@ def outer(x, y):
y.dimshuffle('x', 0)) y.dimshuffle('x', 0))
builtin_any = any
def any(x, axis=None): def any(x, axis=None):
return elemwise.Any(axis)(x) return elemwise.Any(axis)(x)
builtin_all = all
def all(x, axis=None): def all(x, axis=None):
return elemwise.All(axis)(x) return elemwise.All(axis)(x)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论