x = np.random.randn(10000, 10000)
y = np.random.randn(10000, 10000)
xmap = np.memmap('xfile.dat', dtype='float32', mode='w+', shape=x.shape)
ymap = np.memmap('yfile.dat', dtype='float32', mode='w+', shape=y.shape)
xmap[:] = x[:]
ymap[:] = y[:]
prodmap = np.memmap('prodfile.dat', dtype='float32', mode='w+', shape=x.shape)
prodmap[:] = np.memmap.dot(xmap, ymap)
addmap = np.memmap('addfile.dat', dtype='float32', mode='w+', shape=x.shape)
addmap[:] = xmap + ymap
scalemap = np.memmap('scalefile.dat', dtype='float32', mode='w+', shape=x.shape
    )
scale = 1.3
scalemap[:] = scale * xmap
matrix operations with gigantic matrices in python