📚 The CoCalc Library - books, templates and other resources
1sums = [] 2lengths = [] 3for i in range(0, 1000000000, 1000000): 4 chunk = dset[i: i + 1000000] # pull out numpy array 5 sums.append(chunk.sum()) 6 lengths.append(len(chunk)) 7 8total = sum(sums) 9length = sum(lengths) 10print(total / length) 11