generate functionTue, 28 Feb 2023

Matrix multiplication Write two functions that each multiply two square matrices, one without using numpy's built-in functions, and the other using numpy. The input to the first task is given lists of size size by size elements in each. The second task receives objects of type np.ndarray --- square matrices of the same size. The first function should return a list of lists, and the second should return np.array.

def mat_mult(A, B): # write your code here return None def numpy_mat_mult(A, B): # write your code here return None

Questions about programming?Chat with your personal AI assistant