Created
June 18, 2016 16:37
-
-
Save ataias/01454fb7a0addb6a65a08bc339198ecc to your computer and use it in GitHub Desktop.
multiply
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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