Hi, Could someone help with the ‘Sample()’ function for Dinosaur Island? My first output in the list of indices is correct, but the rest are wrong. I suspect it has to do with the hints about ‘ravel’ and/or ‘append’. I have read the hints but dont see how to incorporate the hints in the code.
Below is what I have for Step 3:
# Step 3: Sample the index of a character within the vocabulary from the probability distribution y
# (see additional hints above)
idx = np.random.choice(range(len(y[:,counter])), p = y[:,counter])
# Append the index to "indices"
indices.append(idx)