Question: Implement the function Indy2Vec that takes in two 3 dimentional vectors each represented as an array and tells whether they are linearly independent. v1 =
Implement the function Indy2Vec that takes in two 3 dimentional vectors each represented as an array and tells whether they are linearly independent.
v1 = np.array([0, 5, 0]) v2 = np.array([0, -10, 0]) v3 = np.array([1, 2, 3]) v4 = np.array([-2, -4, -6])
assert Indy2Vec(v1, v2) == False, "Your code said that two linearly dependent vectors were independent" assert Indy2Vec(v3, v4) == False, "Your code said that two linearly dependent vectors were independent" assert Indy2Vec(v1, v3) == True, "Your code said that two linearly independent vectors were dependent" assert Indy2Vec(v2, v3) == True, "Your code said that two linearly independent vectors were dependent"
#begin code here def Indy2Vec(v1, v2):
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
