Question: Implement the function ThreeVec that takes in three 3 dimensional vectors each represented as an array, stacks the arrays vertically (each array is a row
Implement the function ThreeVec that takes in three 3 dimensional vectors each represented as an array, stacks the arrays vertically (each array is a row in a matrix), and returns a list in which the first element is the rank of the matrix, the second element is the rank of its transpose, the third element is its determinant rounded to two decimal places, the fourth element is the first element of its inverse rounded to two decimal places if its inverse exists and is the string "no inverse" if it does not exist.
v1=np.array([10,4.4,13]) v2=np.array([-5,-3.1,4]) v3=np.array([15,5.7,30]) assert(ThreeVec(v1, v2, v3) == [2, 2, 0.0, 'no inverse']), "Your function does not compute the example correctly."
def ThreeVec(v1, v2, v3): #YOUR CODE HERE return 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
