You are viewing a single comment's thread. Return to all comments →
I'm not finding any answers online as to why this code isn't producing the right output:
matrix_one = np.array([[1, 2, 3], [2, 3, 4], [1, 1, 1]]) matrix_two = np.array([[4, 5, 6], [7, 8, 9], [4, 5, 7]]) matprod_list = np.dot(matrix_one, matrix_two) for arr in matprod_list: for num in arr: print(num)
Output: 30 36 24 45 54 39 15 18 15
Is there a method other than .dot() I should be using?
Seems like cookies are disabled on this browser, please enable them to open this website
Linear Algebra Foundations #4- Matrix Multiplication
You are viewing a single comment's thread. Return to all comments →
I'm not finding any answers online as to why this code isn't producing the right output:
Output: 30 36 24 45 54 39 15 18 15
Is there a method other than .dot() I should be using?