# Vector-Scalar Multiplication # The result will be calculated in the following way # res = s*vec1[0] + s*vec1[1] + s*vec1[2] s = 3 vec1 = np.array([5,1,3]) res = s * vec1 print(res) print(type(res))
[15 3 9] <class 'numpy.ndarray'>