Skip to content

Instantly share code, notes, and snippets.

@ataias
Created June 18, 2016 16:37
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 ataias/01454fb7a0addb6a65a08bc339198ecc to your computer and use it in GitHub Desktop.
Save ataias/01454fb7a0addb6a65a08bc339198ecc to your computer and use it in GitHub Desktop.
multiply
import numpy
import time
A = numpy.random.rand(6,6)
B = numpy.random.rand(6,6)
start = time.clock()
D = numpy.random.rand(6,6)
for i in range(0,10):
C = A*B
D = D + C
end = time.clock()
print("Total time taken to multiply ten matrices 6x6: {}".format(end - start))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment