I have two arrays https://i.sstatic.net/2EyfL.png, first one is y coordinates and the second one is x coordinates, when I plot a diagram with these coordinates, it becomes a closed shape like the attached image https://i.sstatic.net/rOQ7A.png, I'm asking for a way to calculate the inside area of this closed shape in python.
Check out the code here: Calculate area of polygon given (x,y) coordinates
def PolyArea(x,y):
return 0.5*np.abs(np.dot(x,np.roll(y,1))-np.dot(y,np.roll(x,1)))