class_docstr: Class defining categorical distribution type functionality
docstr: Recover the numerical columns by argmaxing a one-hot vector.
  
  Args:
      X_one_hot: The one-hot tensor to be collapsed.
  
  Returns:
      A 1d tensor representing the classes defined by the above one-hot
      tensor.
docstr_tok: ["Recover","the","numerical","columns","by","argmaxing","a","one-hot","vector",".","Args",":","X_one_hot",":","The","one-hot","tensor","to","be","collapsed",".","Returns",":","A","1d","tensor","representing","the","classes","defined","by","the","above","one-hot","tensor","."]
code: def _to_index(X_one_hot: torch.Tensor) -> torch.Tensor:
      """
      Recover the numerical columns by argmaxing a one-hot vector.
  
      Args:
          X_one_hot: The one-hot tensor to be collapsed.
  
      Returns:
          A 1d tensor representing the classes defined by the above one-hot
          tensor.
      """
      return torch.argmax(X_one_hot, dim=1)
  
imports: from copy import deepcopy
  from typing import Dict, List, Tuple
  import numpy
  import torch
  from sklearn.preprocessing import OneHotEncoder
  from torch import nn
  from causalnex.structure.pytorch.dist_type._base import DistTypeBase, ExpandColumnsMixin
  from causalnex.structure.structuremodel import StructureModel
label_desc: Use image node_id 7 for calling the DistTypeCategorical obj's underlying member method code with example usage: obj._to_index(X_one_hot) and returns: torch