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(self, axis, out, op, compare):
      if out is not None:
          raise ValueError(
              "Sparse matrices do not support " "an 'out' parameter."
          )
  
      validateaxis(axis)
  
      if axis is None:
          if 0 in self.shape:
              raise ValueError(
                  "Can't apply the operation to " "an empty matrix."
              )
  
          if self.nnz == 0:
              return 0
          else:
              zero = self.dtype.type(0)
              mat = self.tocoo()
              mat.sum_duplicates()
              am = op(mat.data)
              m = mat.data[am]
  
              if compare(m, zero):
                  # cast to Python int to avoid overflow
                  # and RuntimeError
                  return int(mat.row[am]) * mat.shape[1] + int(
                      mat.col[am]
                  )
              else:
                  size = np.prod(mat.shape)
                  if size == mat.nnz:
                      return am
                  else:
                      ind = mat.row * mat.shape[1] + mat.col
                      zero_ind = _find_missing_index(ind, size)
                      if m == zero:
                          return min(zero_ind, am)
                      else:
                          return zero_ind
  
      return self._arg_min_or_max_axis(axis, op, compare)
  
imports: import numpy
  from .base import spmatrix, _ufuncs_with_fixed_point_at_zero
  from .sputils import isscalarlike, validateaxis, matrix
label_desc: Use image node_id 4 for calling the _minmax_mixin obj's underlying member method code with example usage: obj._arg_min_or_max(axis, out, op, compare) and returns: self, int, unknown, am, min, zero_ind