From the link you provided:
Sample a sequence of characters according to a sequence of probability distributions output of the RNN
Arguments: parameters -- python dictionary containing the parameters Waa, Wax, Wya, by, and b. char_to_ix -- python dictionary mapping each character to an index.
Returns: indices -- a list of length n containing the indices of the sampled characters
You are returning the indices from a dictionary you gave as argument. Why should you use char_to_integer
indices.