提交 64d4ef85 authored 作者: Frederic Bastien's avatar Frederic Bastien

another small bug fix:(

上级 d117b248
...@@ -1412,7 +1412,7 @@ def max(x, axis=None): ...@@ -1412,7 +1412,7 @@ def max(x, axis=None):
""" """
if isinstance(axis,int) or axis is None or (isinstance(axis,(list,tuple)) and all([isinstance(i,int) for i in axis])): if isinstance(axis,int) or axis is None or (isinstance(axis,(list,tuple)) and all([isinstance(i,int) for i in axis])):
if axis is None: if axis is None:
axis = len(x.type.broadcastable) axis = len(x.type.broadcastable)-1
return CAReduce(scal.maximum,axis)(x) return CAReduce(scal.maximum,axis)(x)
#TODO: do CAReduce need axis to be constant? #TODO: do CAReduce need axis to be constant?
try: try:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论