mindspore.ops.hypot
- mindspore.ops.hypot(input, other)[源代码]
给定直角三角形的边,逐元素计算其斜边。
支持广播、类型提升。
- 参数:
input (Tensor) - 第一个输入tesnor。
other (Tensor) - 第二个输入tesnor。
- 返回:
Tensor
- 支持平台:
Ascend
GPU
CPU
样例:
>>> import mindspore >>> input = mindspore.tensor([3., 5., 7.]) >>> other = mindspore.tensor([4., 12., 24.]) >>> output = mindspore.ops.hypot(input, other) >>> print(output) [ 5. 13. 25.]