import numpy as np x = np.ones(3) # Vector of three ones y = np.array((2, 4, 6)) # Converts tuple (2, 4, 6) into array a=np.sum(x * y) print(a)