Now I'm reading the book "Grokking Deep Learning" and I've encountered a piece that I could to understant
import sys, numpy as np
from keras.datasets import mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
images, labels = (x_train[0:1000].reshape(1000,28*28) \
255, y_train[0:1000])
one_hot_labels = np.zeros((len(labels),10))
for i,l in enumerate(labels):
one_hot_labels[i][l] = 1 // this row i can't understant
labels = one_hot_labels
How the index l in the arrive one_hot_labels can be array by own? Might that is basic Python but I can't get it