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 _mul_sparse_matrix(self, other):
      M, K1 = self.shape
      K2, N = other.shape
  
      major_axis = self._swap((M, N))[0]
      other = self.__class__(other)  # convert to this format
  
      idx_dtype = get_index_dtype(
          (self.indptr, self.indices, other.indptr, other.indices),
          maxval=M * N,
      )
      indptr = np.empty(major_axis + 1, dtype=idx_dtype)
  
      fn = getattr(_sparsetools, self.format + "_matmat_pass1")
      fn(
          M,
          N,
          np.asarray(self.indptr, dtype=idx_dtype),
          np.asarray(self.indices, dtype=idx_dtype),
          np.asarray(other.indptr, dtype=idx_dtype),
          np.asarray(other.indices, dtype=idx_dtype),
          indptr,
      )
  
      nnz = indptr[-1]
      idx_dtype = get_index_dtype(
          (self.indptr, self.indices, other.indptr, other.indices),
          maxval=nnz,
      )
      indptr = np.asarray(indptr, dtype=idx_dtype)
      indices = np.empty(nnz, dtype=idx_dtype)
      data = np.empty(nnz, dtype=upcast(self.dtype, other.dtype))
  
      fn = getattr(_sparsetools, self.format + "_matmat_pass2")
      fn(
          M,
          N,
          np.asarray(self.indptr, dtype=idx_dtype),
          np.asarray(self.indices, dtype=idx_dtype),
          self.data,
          np.asarray(other.indptr, dtype=idx_dtype),
          np.asarray(other.indices, dtype=idx_dtype),
          other.data,
          indptr,
          indices,
          data,
      )
  
      return self.__class__((data, indices, indptr), shape=(M, N))
  
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 19 for calling the _cs_matrix obj's underlying member method code with example usage: obj._mul_sparse_matrix(other) and returns: self