SyntaxFix
Write A Post
Hire A Developer
Questions
Perhaps the error message is somewhat misleading, but the gist is that X_train is a list, not a numpy array. You cannot use array indexing on it. Make it an array first:
X_train
out_images = np.array(X_train)[indices.astype(int)]