import time, torch
from itertools import product
N = 100
ten = torch.randn(N,N,N)
arr = ten.numpy()
def indexTimer(val):
start = time.time()
for i,j,k in product(range(N), range(N), range(N)):
x = val[i, j, k]
end = time.time()
print('{:.2f}'.format(end-start))
indexTimer(ten)
indexTimer(arr) alpha tstat
Long 6.5% 6.6
Shrt 5.0% 3.7
Those numbers are economically and statistically significant.
"Honors is epaulets. My pop pop taught me that." -RPF