I am currently copying/reformatting data from disk into a memmapped-numpy array. I call flush() every ~5000 elements, but the change-date in Windows does not change.
dimx = 400000
dimy = 100
dimz = 16
data_in: np.memmap = np.memmap(fname_input, dtype='float32', mode='r+', shape=(dimx, dimy, dimz))
for i in range(dimx):
data = next(data_generator)
data_in[i] = data
if (i % 5000) is 0 and i is not 0:
data_in.flush()
print('changes flushed to disk.')