The input array
Axis along which to choose the top k indices. If not given, the flattened array is used. Default is -1.
DType of the output indices when ret_typ is "indices" or "both". An error will be raised if the selected data type cannot precisely represent the indices.
Whether to choose k largest or k smallest elements. Top K largest elements will be chosen if set to false.
Number of top elements to select, should be always smaller than or equal to the element number in the given axis. A global sort is performed if set k < 1.
The return type. "value" means to return the top k values, "indices" means to return the indices of the top k values, "mask" means to return a mask array containing 0 and 1. 1 means the top k values. "both" means to return a list of both values and indices of top k elements.