I was trying to calculate the curvature of a surface given by array of points (x,y,z). Initially I was trying to fit a polynomial equation z=a + bx + cx^2 + dy + exy + fy^2)
heltonbiker's answer about mean curvature is great, but it assumes data points in the 2d arrays are 1 unit apart from each other. If your data points are, for example, .3 units apart from each other, you would need to divide every data point in the answer by .3 squared (.09) to account for this.
For the gaussian curvature in Michael's answer, you would need to multiply each data point by (1/.3**2)**2
(123.45)