class_docstr: base matrix class for compressed row and column oriented matrices
class_docstr_tok: ["base","matrix","class","for","compressed","row","and","column","oriented","matrices"]
code: def _maximum_minimum(self, other, npop, op_name, dense_check):
      if isscalarlike(other):
          if dense_check(other):
              warn(
                  "Taking maximum (minimum) with > 0 (< 0) number results"
                  " to a dense matrix.",
                  SparseEfficiencyWarning,
                  stacklevel=3,
              )
              other_arr = np.empty(
                  self.shape, dtype=np.asarray(other).dtype
              )
              other_arr.fill(other)
              other_arr = self.__class__(other_arr)
              return self._binopt(other_arr, op_name)
          else:
              self.sum_duplicates()
              new_data = npop(self.data, np.asarray(other))
              mat = self.__class__(
                  (new_data, self.indices, self.indptr),
                  dtype=new_data.dtype,
                  shape=self.shape,
              )
              return mat
      elif isdense(other):
          return npop(self.todense(), other)
      elif isspmatrix(other):
          return self._binopt(other, op_name)
      else:
          raise ValueError("Operands not compatible.")
  
imports: from __future__ import division, print_function, absolute_import
  from warnings import warn
  import operator
  import numpy
  from scipy._lib.six import zip
  from scipy._lib._util import _prune_array
  from .base import spmatrix, isspmatrix, SparseEfficiencyWarning
  from .data import _data_matrix, _minmax_mixin
  from .dia import dia_matrix
  from .None import _sparsetools
  from .sputils import upcast, upcast_char, to_native, isdense, isshape, getdtype, isscalarlike, IndexMixin, get_index_dtype, downcast_intp_index, get_sum_dtype, check_shape, matrix, asmatrix
label_desc: Use image node_id 21 for calling the _cs_matrix obj's underlying member method code with example usage: obj._maximum_minimum(other, npop, op_name, dense_check) and returns: self, mat, npop, self