class_docstr: This class is a wrapper for numpy sort function.
class_docstr_tok: ["This","class","is","a","wrapper","for","numpy","sort","function","."]
docstr: Calculates indices which can be used to reverse sorting operation of
  "a" tensor along "axis".
  
  Returns
  -------
  1d array if axis is None
  list of length len(a.shape) otherwise
docstr_tok: ["Calculates","indices","which","can","be","used","to","reverse","sorting","operation","of","''","a","''","tensor","along","``","axis","''",".","Returns","--","--","--","-","1d","array","if","axis","is","None","list","of","length","len","(","a.shape",")","otherwise"]
code: def __get_argsort_indices(self, a, axis):
      """
      Calculates indices which can be used to reverse sorting operation of
      "a" tensor along "axis".
  
      Returns
      -------
      1d array if axis is None
      list of length len(a.shape) otherwise
  
      """
  
      # The goal is to get gradient wrt input from gradient
      # wrt sort(input, axis)
      idx = argsort(a, axis, kind=self.kind, order=self.order)
      # rev_idx is the reverse of previous argsort operation
      rev_idx = argsort(idx, axis, kind=self.kind, order=self.order)
      indices = []
      axis_data = theano.tensor.switch(
          theano.tensor.ge(axis.data, 0), axis.data, a.ndim + axis.data
      )
      for i in range(a.ndim):
          index_val = theano.tensor.switch(
              theano.tensor.eq(i, axis_data),
              rev_idx,
              self.__get_expanded_dim(a, axis, i),
          )
          indices.append(index_val)
      return indices
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano.tensor.basic import mul, arange
  from theano.gradient import grad_undefined
  from theano.tensor.subtensor import set_subtensor
label_desc: Use image node_id 8 for calling the SortOp obj's underlying member method code with example usage: obj.__get_argsort_indices(a, axis) and returns: indices