mindspore.numpy.lcm
- mindspore.numpy.lcm(x1, x2, dtype=None)[源代码]
Returns the lowest common multiple of
|x1|
and|x2|
.说明
Numpy arguments out, where, casting, order, subok, signature, and extobj are not supported.
- 参数
x1 (Tensor) – input data.
x2 (Tensor) – input data.
dtype (
mindspore.dtype
, optional) – Default:None
. Overrides the dtype of the output Tensor.
- 返回
Tensor or scalar, the lowest common multiple of the absolute value of the inputs. This is a scalar if both x1 and x2 are scalars.
- Supported Platforms:
Ascend
GPU
CPU
样例
>>> import mindspore.numpy as np >>> output = np.lcm(np.arange(6), np.array(20)) >>> print(output) [ 0 20 20 60 20 20]