class_docstr: Operations related to finding k-largest elements.
  
  Parameters
  ----------
  axis: integer
      Defaults to ``-1``.
      The axis to perform the operation. Must be in range ``[-ndim, ndim)``, where
      ``ndim`` is the dimensionality of input tensor.
  
  idx_dtype: string
      Specify output dtype for indices, defaults to ``int64``, must be integer type.
  
  sorted: bool
      NOTE: NOT IMPLEMENTED YET
      Defaults to ``True``
  
      If True, the result array would be sorted in descending order.
  
  
  Notes
  -----
  - The output order is not guaranteed. On the CPU, we use
    ``np.partition`` and ``np.argpartition`` that only make sure the
    k-th element is the correct one and that the other
    elements are on the correct side.
  - By default, this Op gives two outputs: values and indices. However
    optimizers may remove a certain output if not needed.
  - Computing the gradient requests the computation of the indices in
    forward pass.
  - If the top-k-th value is not unique, we cannot guarantee the
    output indices being deterministically chosen.
  
  See Also
  --------
  topk
  argtopk
  argtopk_and_topk
class_docstr_tok: ["Operations","related","to","finding","k-largest","elements",".","Parameters","--","--","--","--","--","axis",":","integer","Defaults","to","``","-1","``",".","The","axis","to","perform","the","operation",".","Must","be","in","range","``","[","-ndim",",","ndim",")","``",",","where","``","ndim","``","is","the","dimensionality","of","input","tensor",".","idx_dtype",":","string","Specify","output","dtype","for","indices",",","defaults","to","``","int64","``",",","must","be","integer","type",".","sorted",":","bool","NOTE",":","NOT","IMPLEMENTED","YET","Defaults","to","``","True","``","If","True",",","the","result","array","would","be","sorted","in","descending","order",".","Notes","--","--","-","-","The","output","order","is","not","guaranteed",".","On","the","CPU",",","we","use","``","np.partition","``","and","``","np.argpartition","``","that","only","make","sure","the","k-th","element","is","the","correct","one","and","that","the","other","elements","are","on","the","correct","side",".","-","By","default",",","this","Op","gives","two","outputs",":","values","and","indices",".","However","optimizers","may","remove","a","certain","output","if","not","needed",".","-","Computing","the","gradient","requests","the","computation","of","the","indices","in","forward","pass",".","-","If","the","top-k-th","value","is","not","unique",",","we","can","not","guarantee","the","output","indices","being","deterministically","chosen",".","See","Also","--","--","--","--","topk","argtopk","argtopk_and_topk"]
code: def __str__(self):
      return "%(op)s{axis=%(axis)d, sorted=%(sorted)s}" % dict(
          op=self.__class__.__name__, axis=self.axis, sorted=self.sorted
      )
  
imports: import numpy
  from pytensor.gradient import grad_undefined
  from pytensor.graph.basic import Apply, Constant
  from pytensor.graph.op import Op
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor.basic import arange, as_tensor_variable, flatten, switch
  from pytensor.tensor.math import eq, ge, mul
  from pytensor.tensor.shape import shape
  from pytensor.tensor.subtensor import set_subtensor
  from pytensor.tensor.type import TensorType, integer_dtypes
label_desc: Use image node_id 2 for calling the TopKOp obj's underlying member method code with example usage: obj.__str__() and returns: unknown