提交 7f4f7396 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

added a "tensor.square" alias to "tensor.sqr" to maintain similarity to

numpy interface
上级 99f22814
......@@ -2656,6 +2656,11 @@ def round_half_away_from_zero(a):
def sqr(a):
"""square of a"""
#alias to sqr, included to maintain similarity with numpy interface
def square(a):
"""square of a"""
return sqr(a)
@_scal_elemwise_with_nfunc('sqrt', 1, 1)
def sqrt(a):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论