area1 = 0.5 * np.abs(np.dot(x, np.roll(y, 1)) - np.dot(y, np.roll(x, 1)))
area2 = 0.5 * np.abs(np.dot(x[1:], y[:-1]) - np.dot(y[1:], x[:-1]))
print("""
roll area {}
slice area{}""".format(area1, area2))
Area of polygon calculation inconsistent