def WriteMatrix(matrix, outfile=sys.stdout, separator="\t", format="%f",
                row_headers=None, col_headers=None):
    if col_headers:
        outfile.write(separator + separator.join(col_headers) + "\n")

    for x in range(0, matrix.shape[0]):
        if row_headers:
            outfile.write(row_headers[x] + separator)
        outfile.write(
            string.join(map(lambda x: format % x, matrix[x, ]), separator) + "\n")
Mimic ``as_view()``, but returns view instance.
dataset/ETHPy150Open CGATOxford/cgat/CGAT/MatlabTools.py/WriteMatrix--crossover with--dataset/ETHPy150Open benoitbryon/django-downloadview/django_downloadview/test.py/setup_view