demo_numpy_ufunc_lcm2.py:
import numpy as np arr = np.array([3, 6, 9]) x = np.lcm.reduce(arr) print(x)
C:\Users\My Name>python demo_numpy_ufunc_lcm2.py
18