Well I wouldn't even worry about memory blocks ... 300, 000, 000 values
a = np.random.randint(0, 10, size=(12, 5000, 5000))
np.mean(a, axis=0)
Out[5]:
array([[ 3.17, 5.50, 4.75, ..., 4.00, 4.33, 5.25],
[ 5.25, 6.50, 6.00, ..., 4.42, 5.00, 3.42],
[ 3.25, 5.33, 4.58, ..., 3.67, 4.83, 4.58],
...,
[ 4.17, 2.83, 3.67, ..., 2.58, 4.08, 5.42],
[ 4.83, 4.17, 4.83, ..., 6.58, 3.50, 3.67],
[ 5.42, 4.33, 5.75, ..., 4.67, 3.00, 2.92]])
on the 8 Gb Surface Book...
even double (float64) 10,000 x 10,000 x 12 months caused a minor murmur
a = np.random.randint(0, 10, size=(12, 10000, 10000)) * 1.0
np.mean(a, axis=0)
Out[12]:
array([[ 5.00, 4.25, 5.17, ..., 3.67, 2.08, 5.08],
[ 4.67, 5.50, 3.08, ..., 4.17, 3.50, 4.75],
[ 3.83, 4.17, 4.00, ..., 3.50, 4.58, 4.42],
...,
[ 5.75, 5.00, 4.42, ..., 3.92, 5.25, 4.50],
[ 4.17, 3.83, 4.50, ..., 5.17, 4.67, 4.50],
[ 4.75, 4.00, 3.08, ..., 4.17, 5.33, 5.83]])
a.size
Out[13]: 1200000000