def polygon_area(pr, pc):
 pr = np.asarray(pr)
 pc = np.asarray(pc)
 return (0.5 * np.abs(np.sum(((pc[:(-1)] * pr[1:]) - (pc[1:] * pr[:(-1)])))))

def polygon_area ( pr , pc ) : pr = np . asarray ( pr ) pc = np . asarray ( pc ) return ( 0.5 * np . abs ( np . sum ( ( ( pc [ : ( - 1 ) ] * pr [ 1 : ] ) - ( pc [ 1 : ] * pr [ : ( - 1 ) ] ) ) ) ) )
compute the area of a polygon .