parameters: (matrix)
return_statement: return mat
docstring: Convert sparse matrix to dense ndarray
docstring_summary: Convert sparse matrix to dense ndarray
docstring_tokens: Convert sparse matrix to dense ndarray
function: def sparseMatrix2Dense(matrix):
      """Convert sparse matrix to dense ndarray"""
  
      rr, cc, vals = sparseMatrix2Array(matrix, indices=True, getInCRS=False)
      mat = np.zeros((matrix.rows(), matrix.cols()))
  
      for i, r in enumerate(rr):
          mat[r, cc[i]] = vals[i]
  
      return mat
function_tokens: def sparseMatrix2Dense ( matrix ) : rr , cc , vals = sparseMatrix2Array ( matrix , indices = True , getInCRS = False ) mat = np . zeros ( ( matrix . rows ( ) , matrix . cols ( ) ) ) for i , r in enumerate ( rr ) : mat [ r , cc [ i ] ] = vals [ i ] return mat