Discussion about this post

User's avatar
Orith Loeb's avatar

Hii, here's mine

# DDC-51: Distributive property of vector-scalar multiplication

import numpy as np

v1 = np.array ([1,2 ,-3])

v2 = np.array ([-5,1.5,3])

s = 2.5

mult1 = s*(v1+v2)

mult2 = s*v1 + s*v2

print (np.array_equal(mult1, mult2))

Expand full comment

No posts