im_size = 5000, 4000
cum_sum = np.zeros(im_size)
cum_sum_of_squares = np.zeros(im_size)
n = 0
for filename in filenames:
    image = read_your_image(filename)
cum_sum += image
cum_sum_of_squares += image ** 2
n += 1
mean_image = cum_sum / n
std_image = np.sqrt(cum_sum_of_squares / n - mean_image ** 2)
Calculating stats across 1000 arrays