class_docstr: The output of the :class:`Select` method, which holds an assignment
  from selected nodes to their respective cluster(s).
  
  Args:
      node_index (torch.Tensor): The indices of the selected nodes.
      num_nodes (int): The number of nodes.
      cluster_index (torch.Tensor): The indices of the clusters each node in
          :obj:`node_index` is assigned to.
      num_clusters (int): The number of clusters.
      weight (torch.Tensor, optional): A weight vector, denoting the strength
          of the assignment of a node to its cluster. (default: :obj:`None`)
class_docstr_tok: ["The","output","of","the",":","class",":","`","Select","`","method",",","which","holds","an","assignment","from","selected","nodes","to","their","respective","cluster","(","s",")",".","Args",":","node_index","(","torch.Tensor",")",":","The","indices","of","the","selected","nodes",".","num_nodes","(","int",")",":","The","number","of","nodes",".","cluster_index","(","torch.Tensor",")",":","The","indices","of","the","clusters","each","node","in",":","obj",":","`","node_index","`","is","assigned","to",".","num_clusters","(","int",")",":","The","number","of","clusters",".","weight","(","torch.Tensor",",","optional",")",":","A","weight","vector",",","denoting","the","strength","of","the","assignment","of","a","node","to","its","cluster",".","(","default",":",":","obj",":","`","None","`",")"]
code: def __init__(
      self,
      node_index: Tensor,
      num_nodes: int,
      cluster_index: Tensor,
      num_clusters: int,
      weight: Optional[Tensor] = None,
  ):
      if node_index.dim() != 1:
          raise ValueError(
              f"Expected 'node_index' to be one-dimensional "
              f"(got {node_index.dim()} dimensions)"
          )
  
      if cluster_index.dim() != 1:
          raise ValueError(
              f"Expected 'cluster_index' to be one-dimensional "
              f"(got {cluster_index.dim()} dimensions)"
          )
  
      if node_index.numel() != cluster_index.numel():
          raise ValueError(
              f"Expected 'node_index' and 'cluster_index' to "
              f"hold the same number of values (got "
              f"{node_index.numel()} and "
              f"{cluster_index.numel()} values)"
          )
  
      if weight is not None and weight.dim() != 1:
          raise ValueError(
              f"Expected 'weight' vector to be one-dimensional "
              f"(got {weight.dim()} dimensions)"
          )
  
      if weight is not None and weight.numel() != node_index.numel():
          raise ValueError(
              f"Expected 'weight' to hold {node_index.numel()} "
              f"values (got {weight.numel()} values)"
          )
  
      self.node_index = node_index
      self.num_nodes = num_nodes
      self.cluster_index = cluster_index
      self.num_clusters = num_clusters
      self.weight = weight
  
file_path: pytorch_geometric/torch_geometric/nn/pool/select/base.py
imports: from dataclasses import dataclass
  from typing import Optional
  import torch
  from torch import Tensor
  import torch_geometric.typing
label_desc: Use image node_id 1 to create a new SelectOutput object  with example: obj = SelectOutput(node_index, num_nodes, cluster_index, num_clusters, weight)