def METHOD_NAME(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