def _shape_array_to_matrix(shape):
    """ From [x1 y1 x2 y2 ... xp yp]
        to   [[x1 y1]
              [x2 y2]
              .
              .
              .
              [xp yp]]
    """
    assert len(shape.shape) == 1
    temp_shape = shape.reshape((-1, 2))
    return temp_shape