Skip to content

Instantly share code, notes, and snippets.

@wuurrd
Last active June 21, 2021 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wuurrd/d9370aca1d57207e59580b8a9dfafa5c to your computer and use it in GitHub Desktop.
Save wuurrd/d9370aca1d57207e59580b8a9dfafa5c to your computer and use it in GitHub Desktop.
Matrix multiplication
import numpy as np
import unittest
A = np.random.randn(5, 5)
B = np.random.randn(5, 3)
C = A @ B
def matrix_multiply(A, B):
# TODO: Implement me
return np.zeros([5, 3])
print(np.allclose(C, matrix_multiply(A, B)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment