<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encode_label(label, nb_classes):
 """One-hot encoding of a single label :param label: class label (int or double without floating point digits) :param nb_classes: int, number of total classes :return: one-hot encoded vector """

    encoded = np.zeros(nb_classes)
    encoded[int(label)] = 1.
    return encoded