class_docstr: Data attributes manage sample-wise information such as task or
  class labels.
  
  It provides access to unique values (`self.uniques`) and their indices
  (`self.val_to_idx`). Both fields are initialized lazily.
  
  Data attributes can be efficiently concatenated and subsampled.
class_docstr_tok: ["Data","attributes","manage","sample-wise","information","such","as","task","or","class","labels",".","It","provides","access","to","unique","values","(","`","self.uniques","`",")","and","their","indices","(","`","self.val_to_idx","`",")",".","Both","fields","are","initialized","lazily",".","Data","attributes","can","be","efficiently","concatenated","and","subsampled","."]
docstr: Subset operation.
  
  Return a new `DataAttribute` by keeping only the elements in `indices`.
  
  :param indices: position of the elements in the new subset
  :return: the new `DataAttribute`
docstr_tok: ["Subset","operation",".","Return","a","new","`","DataAttribute","`","by","keeping","only","the","elements","in","`","indices","`",".",":","param","indices",":","position","of","the","elements","in","the","new","subset",":","return",":","the","new","`","DataAttribute","`"]
code: def subset(self, indices):
      """Subset operation.
  
      Return a new `DataAttribute` by keeping only the elements in `indices`.
  
      :param indices: position of the elements in the new subset
      :return: the new `DataAttribute`
      """
      return DataAttribute(
          self.data.subset(indices),
          self.name,
          use_in_getitem=self.use_in_getitem,
      )
  
imports: from typing import Dict, List, Optional, Sequence, Set, TypeVar, Union, overload
  import torch
  from .dataset_definitions import IDataset
  from .flat_data import ConstantSequence, FlatData
label_desc: Use image node_id 13 for calling the DataAttribute obj's underlying member method code with example usage: obj.subset(indices) and returns: DataAttribute