docstr: Convert 1D array of labels to one hot representation
  
  Args:
          labels: 1D numpy array
docstr_tok: ["Convert","1D","array","of","labels","to","one","hot","representation","Args",":","labels",":","1D","numpy","array"]
code: def labels_to_one_hot(self, labels):
      """Convert 1D array of labels to one hot representation
  
      Args:
              labels: 1D numpy array
      """
      new_labels = np.zeros((labels.shape[0], self.n_classes))
      new_labels[range(labels.shape[0]), labels] = np.ones(labels.shape)
      return new_labels
  
file_path: auptimizer/Examples/cai_eas/eas/data_providers/base_provider.py
imports: import numpy
label_desc: Use image node_id 3 for calling the DataProvider obj's underlying member method code with example usage: obj.labels_to_one_hot(labels) and returns: new_labels