In [1]:
import numpy as np

In [2]:
a = np.array([0, 2, 3, 6])
b = np.array([3, 4, 5, 15])

In [3]:
print(np.lcm(a, b))


[ 0  4 15 30]

In [4]:
print(type(np.lcm(a, b)))


<class 'numpy.ndarray'>

In [5]:
print(np.lcm(6, 15))


30

In [6]:
a_2d = np.array([[0, 2, 3, 6], [0, 2, 3, 6]])
print(a_2d)


[[0 2 3 6]
 [0 2 3 6]]

In [7]:
print(np.lcm(a_2d, b))


[[ 0  4 15 30]
 [ 0  4 15 30]]

In [8]:
print(np.lcm(a, 15))


[ 0 30 15 30]