Question: def makeAi (A,i,b) : ','Replace the ith column in A with b '. if type (A)== np.matrix: A=A.tolist() if type(b)== np.matrix: b=b.tolist() Ai = copy.deepcopy

def makeAi (A,i,b) : ','Replace the ith column in A with b '. if type (A)== np.matrix: A=A.tolist() if type(b)== np.matrix: b=b.tolist() Ai = copy.deepcopy (A) for j in range ( len (Ai)) : Ai [j][i]=b[j][] return Ai DO THIS: Create a new function called cramersRule, which takes A and b and returns x using the Cramer's rule. Note: Use to find the required determinants. mydet is too slow. \# Stub code. Replace the np.linalg.solve code with your answer def cramersRule (A,b) : detA=nplinalgdet(A) x=[] \#\#\#\#Start of your code here\#\#\#\#\# \#\#\#\#End of your code here\#\#\#\# return x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
