'One hot encode given string C.
# Arguments
num_rows: Number of rows in the returned one hot encoding. This is
used to keep the # of rows for each data the same.'

def encode(self, C, num_rows):

    x = np.zeros((num_rows, len(self.chars)))
    for (i, c) in enumerate(C):
        x[(i, self.char_indices[c])] = 1
    return x
