class_docstr: Basic class representing data in Compressed Sparse Column (CSC) format.
  
  Examples
  --------
  >>> indptr = torch.tensor([0, 1, 3])
  >>> indices = torch.tensor([1, 4, 2])
  >>> csc_foramt_base = CSCFormatBase(indptr=indptr, indices=indices)
  >>> print(csc_format_base.indptr)
  ... torch.tensor([0, 1, 3])
  >>> print(csc_foramt_base)
  ... torch.tensor([1, 4, 2])
class_docstr_tok: ["Basic","class","representing","data","in","Compressed","Sparse","Column","(","CSC",")","format",".","Examples","--","--","--","--",">",">",">","indptr","=","torch.tensor","(","[","0",",","1",",","3","]",")",">",">",">","indices","=","torch.tensor","(","[","1",",","4",",","2","]",")",">",">",">","csc_foramt_base","=","CSCFormatBase","(","indptr=indptr",",","indices=indices",")",">",">",">","print","(","csc_format_base.indptr",")","...","torch.tensor","(","[","0",",","1",",","3","]",")",">",">",">","print","(","csc_foramt_base",")","...","torch.tensor","(","[","1",",","4",",","2","]",")"]
docstr: Copy `CSCFormatBase` to the specified device using reflection.
docstr_tok: ["Copy","`","CSCFormatBase","`","to","the","specified","device","using","reflection","."]
code: def to(
      self, device: torch.device
  ) -> None:  # pylint: disable=invalid-name
      """Copy `CSCFormatBase` to the specified device using reflection."""
  
      for attr in dir(self):
          # Only copy member variables.
          if not callable(getattr(self, attr)) and not attr.startswith(
              "__"
          ):
              setattr(
                  self,
                  attr,
                  recursive_apply(
                      getattr(self, attr), lambda x: apply_to(x, device)
                  ),
              )
  
      return self
  
file_path: dgl/python/dgl/graphbolt/base.py
imports: from dataclasses import dataclass
  import torch
  from torch.utils.data import functional_datapipe
  from torchdata.datapipes.iter import IterDataPipe
  from ..utils import recursive_apply
label_desc: Use image node_id 3 for calling the CSCFormatBase obj's underlying member method code with example usage: obj.to(device) and returns: self