aboutsummaryrefslogtreecommitdiff
path: root/sem4/hpp/m10/opg1.py
blob: b8de12ab614461bb6efe61f30ad899b6432c8af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python3
# Measure the performance of your Python matrix multiplication
import numpy as np
import time

size=1000

a = np.random.random((size, size))
b = np.random.random((size, size))

start = time.time()
result = a @ b
end = time.time()


print(result)
print(f"Took { end - start } seconds")