def labels_to_one_hot(labels, n_classes=(43 + 1)):
    'Convert 1D array of labels to one hot representation\n\n    Args:\n        labels: 1D numpy array\n    '
    new_labels = np.zeros((n_classes,))
    new_labels[labels] = 1
    return new_labels
Convert 1D array of labels to one hot representation

Args:
    labels: 1D numpy array
def labels_to_one_hot(labels, n_classes=(43 + 1)):
    'Convert 1D array of labels to one hot representation\n\n    Args:\n        labels: 1D numpy array\n    '
    new_labels = np.zeros((n_classes,))
    new_labels[labels] = 1
    return new_labels