提交 d862a53f authored 作者: bergstra@ip05.m's avatar bergstra@ip05.m

added largest function

上级 2a5dfb6e
...@@ -997,6 +997,11 @@ def smallest(*args): ...@@ -997,6 +997,11 @@ def smallest(*args):
"""Return the [elementwise] smallest of a variable number of arguments (like python's min).""" """Return the [elementwise] smallest of a variable number of arguments (like python's min)."""
return min(stack(*args), axis=0) return min(stack(*args), axis=0)
@constructor
def largest(*args):
"""Return the [elementwise] largest of a variable number of arguments (like python's max)."""
return max(stack(*args), axis=0)
########################## ##########################
# Comparison # Comparison
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论