I needed to create a numpy matrix with the following code
encoder_data = np.zeros((347101, 400, 347101), dtype='float32')
but when i execute that code it issues MemoryError so im thinking if i could the matrix into file would also be good.
So i came across on this answer that uses memmap to save the matrix to a file and i came up with the following code
encoder_input_data = np.memmap('encoder_input_data.memmap', dtype='float32', mode='w+', shape=(347101, 400, 347101))
but with the above code it issues another error "OSError: [Errno 22] Invalid argument"
Can someone help me save the same results of np.zeros((347101, 400, 347101), dtype='float32')
to a file? Im new to python so i don't exactly know what to do now.