I do not believe that you changed the order of saving images in w compared to images , so the idx from np.argmin(d) should be the same index as the images list, so
images[idx]
There must be an image that you want.
Sure,
images[idx].shape
will give (1800,) because it is still flattened. If you want to untie it, you can do:
images[idx].reshape(90,90)
source share