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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started