points = [(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0)]
points_fit = cpr._fit_best_valid_polygon(points)
assert np.allclose(points, points_fit)
assert ia.Polygon(points_fit).is_valid
// square-like, but top line has one point in its center which"s
// y-coordinate is below the bottom line
points = [(0.0, 0.0), (0.45, 0.0), (0.5, 1.5), (0.55, 0.0), (1.0, 0.0),
After Change
cpr = _ConcavePolygonRecoverer()
points = [(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0)]
points_fit = cpr._fit_best_valid_polygon(points, random_state=np.random.RandomState(0))
assert points_fit == sm.xrange(len(points))
// square-like, but top line has one point in its center which"s