class_docstr: Adds the Laplacian eigenvector positional encoding from the
  `"Benchmarking Graph Neural Networks" <https://arxiv.org/abs/2003.00982>`_
  paper to the given graph
  (functional name: :obj:`add_laplacian_eigenvector_pe`).
  
  Args:
      k (int): The number of non-trivial eigenvectors to consider.
      attr_name (str, optional): The attribute name of the data object to add
          positional encodings to. If set to :obj:`None`, will be
          concatenated to :obj:`data.x`.
          (default: :obj:`"laplacian_eigenvector_pe"`)
      is_undirected (bool, optional): If set to :obj:`True`, this transform
          expects undirected graphs as input, and can hence speed up the
          computation of eigenvectors. (default: :obj:`False`)
      **kwargs (optional): Additional arguments of
          :meth:`scipy.sparse.linalg.eigs` (when :attr:`is_undirected` is
          :obj:`False`) or :meth:`scipy.sparse.linalg.eigsh` (when
          :attr:`is_undirected` is :obj:`True`).
class_docstr_tok: ["Adds","the","Laplacian","eigenvector","positional","encoding","from","the","`","``","Benchmarking","Graph","Neural","Networks","''","<","https",":","\/\/arxiv.org\/abs\/2003.00982",">","`","_","paper","to","the","given","graph","(","functional","name",":",":","obj",":","`","add_laplacian_eigenvector_pe","`",")",".","Args",":","k","(","int",")",":","The","number","of","non-trivial","eigenvectors","to","consider",".","attr_name","(","str",",","optional",")",":","The","attribute","name","of","the","data","object","to","add","positional","encodings","to",".","If","set","to",":","obj",":","`","None","`",",","will","be","concatenated","to",":","obj",":","`","data.x","`",".","(","default",":",":","obj",":","`","``","laplacian_eigenvector_pe","''","`",")","is_undirected","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","this","transform","expects","undirected","graphs","as","input",",","and","can","hence","speed","up","the","computation","of","eigenvectors",".","(","default",":",":","obj",":","`","False","`",")","*","*","kwargs","(","optional",")",":","Additional","arguments","of",":","meth",":","`","scipy.sparse.linalg.eigs","`","(","when",":","attr",":","`","is_undirected","`","is",":","obj",":","`","False","`",")","or",":","meth",":","`","scipy.sparse.linalg.eigsh","`","(","when",":","attr",":","`","is_undirected","`","is",":","obj",":","`","True","`",")","."]
code: def __init__(
      self,
      k: int,
      attr_name: Optional[str] = "laplacian_eigenvector_pe",
      is_undirected: bool = False,
      **kwargs: Any,
  ) -> None:
      self.k = k
      self.attr_name = attr_name
      self.is_undirected = is_undirected
      self.kwargs = kwargs
  
file_path: pytorch_geometric/torch_geometric/transforms/add_positional_encoding.py
imports: from typing import Any, Optional
  import numpy
  import torch
  from torch import Tensor
  import torch_geometric.typing
  from torch_geometric.data import Data
  from torch_geometric.data.datapipes import functional_transform
  from torch_geometric.transforms import BaseTransform
  from torch_geometric.utils import get_laplacian, get_self_loop_attr, is_torch_sparse_tensor, scatter, to_edge_index, to_scipy_sparse_matrix, to_torch_coo_tensor, to_torch_csr_tensor
label_desc: Use image node_id 1 to create a new AddLaplacianEigenvectorPE object from inherited base classes: BaseTransform with example: obj = AddLaplacianEigenvectorPE(k, attr_name, is_undirected)