You can calculate it using matplotlib.delaunay.triangulate.Triangulation :
Triangulation (x, y) x, y - coordinates of points in the form of 1-D arrays of floats
. ,.
Attributes: (all should be considered read-only to maintain consistency) x, y - coordinates of points in the form of 1-D arrays of floats.
circumcenters -- (ntriangles, 2) array of floats giving the (x,y) coordinates of the circumcenters of each triangle (indexed by a triangle_id).
Adapted from one of the matplotlib examples (maybe this is a cleaner way, but it should work):
import matplotlib.pyplot as plt import matplotlib.delaunay import matplotlib.tri as tri import numpy as np import math
source share