def _flatten(mat):
    """
    Convert array format:
        [[A, C, E],
         [B, D, F]]
         ->
        [A, B, C, D, E, F]
    """
    return [mat[0][0], mat[1][0], mat[0][1], mat[1][1], mat[0][2], mat[1][2]]
