!47126 添加ops.hypot公式

Merge pull request !47126 from DavidFFFan/code_docs_add_rewrite_doc
This commit is contained in:
i-robot 2022-12-23 05:03:21 +00:00 committed by Gitee
commit 6f4ad04658
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,9 @@ mindspore.ops.hypot
按元素计算以输入Tensor为直角边的三角形的斜边。
两个输入的shape需要支持广播数据类型应为float32、float64。
.. math::
out_i = \sqrt{x_i^2 + other_i^2}
参数:
- **x** (Tensor) - 第一个输入Tesnor。
- **other** (Tensor) - 第二个输入Tesnor。

View File

@ -4322,11 +4322,14 @@ def orgqr(x, tau):
def hypot(x, other):
"""
r"""
Computes hypotenuse of input tensors element-wise as legs of a right triangle.
The shape of two inputs should be broadcastable, and data type of them should be
one of: float32, float64
.. math::
out_i = \sqrt{x_i^2 + other_i^2}
Args:
x (Tensor): The first input tensor.
other (Tensor): The second input tensor.