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

18 lines
675 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.Gcd
=================
.. py:class:: mindspore.ops.Gcd
逐元素计算输入Tensor的最大公约数。两个输入的shape需要能进行广播操作并且数据类型必须为int32、int64。
输入:
- **x1** (Tensor) - 第一个输入Tensor。
- **x2** (Tensor) - 第二个输入Tensor。
输出:
- Tensor, shape与输入进行广播后的其中一个相同数据类型为两个输入中的最高精度的类型。
异常:
- **TypeError** - 如果 `x1` 或者 `x2` 的数据类型不是int32或者int64。
- **ValueError** - 如果两个输入的shape不能进行广播操作。