I am looking for the best way to send large Numpy arrays (composed mainly of images) via Flask.
For now, I am now doing something like this:
with open('test_temp', 'wb') as f:
my_array = np.load('test_temp')
But the .npy file is very large so it takes too long.
I thought about using h5py but as the images have different size (array.shape = (200,)), I cannot use h5py (create a dataset for each image would be too long).
Does anyone get an idea of how to optimize this?