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 toarray(self, order=None, out=None):
      if out is None and order is None:
          order = self._swap("cf")[0]
      out = self._process_toarray_args(order, out)
      if not (out.flags.c_contiguous or out.flags.f_contiguous):
          raise ValueError("Output array must be C or F contiguous")
      # align ideal order with output array order
      if out.flags.c_contiguous:
          x = self.tocsr()
          y = out
      else:
          x = self.tocsc()
          y = out.T
      M, N = x._swap(x.shape)
      _sparsetools.csr_todense(M, N, x.indptr, x.indices, x.data, y)
      return out
  
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 35 for calling the _cs_matrix obj's underlying member method code with example usage: obj.toarray(order, out) and returns: out