class_docstr: Mixin for min and max methods.
  
  These are not implemented for dia_matrix, hence the separate class.
class_docstr_tok: ["Mixin","for","min","and","max","methods",".","These","are","not","implemented","for","dia_matrix",",","hence","the","separate","class","."]
code: def _arg_min_or_max_axis(self, axis, op, compare):
      if self.shape[axis] == 0:
          raise ValueError(
              "Can't apply the operation along a zero-sized "
              "dimension."
          )
  
      if axis < 0:
          axis += 2
  
      zero = self.dtype.type(0)
  
      mat = self.tocsc() if axis == 0 else self.tocsr()
      mat.sum_duplicates()
  
      ret_size, line_size = mat._swap(mat.shape)
      ret = np.zeros(ret_size, dtype=int)
  
      (nz_lines,) = np.nonzero(np.diff(mat.indptr))
      for i in nz_lines:
          p, q = mat.indptr[i : i + 2]
          data = mat.data[p:q]
          indices = mat.indices[p:q]
          am = op(data)
          m = data[am]
          if compare(m, zero) or q - p == line_size:
              ret[i] = indices[am]
          else:
              zero_ind = _find_missing_index(indices, line_size)
              if m == zero:
                  ret[i] = min(am, zero_ind)
              else:
                  ret[i] = zero_ind
  
      if axis == 1:
          ret = ret.reshape(-1, 1)
  
      return matrix(ret)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from .base import spmatrix, _ufuncs_with_fixed_point_at_zero
  from .sputils import isscalarlike, validateaxis, matrix
label_desc: Use image node_id 3 for calling the _minmax_mixin obj's underlying member method code with example usage: obj._arg_min_or_max_axis(axis, op, compare) and returns: matrix