mindspore/docs/api/api_python/ops/mindspore.ops.Hypot.rst

19 lines
718 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.Hypot
===================
.. py:class:: mindspore.ops.Hypot
将输入Tensor的逐个元素作为直角三角形的直角边并计算其斜边的值。
两个输入的shape应该是可广播的且它们的数据类型应该是其中之一float32、float64。
输入:
- **x1** (Tensor) - 第一个输入Tensor。
- **x2** (Tensor) - 第二个输入Tensor。
输出:
Tensorshape与广播后的shape相同数据类型为两个输入中具有更高的精度的那一个。
异常:
- **TypeError** - 如果 `x1``x2` 的数据类型不是float32或float64。
- **ValueError** - 如果两个输入的shape无法广播。