29 x, y, z = x-xc, y-yc, z-zc
30 denom = (x**2 + y**2 + z**2)**(3/2)
31 sqrt_denom = np.sqrt(x**2 + y**2 + z**2)
32 Hxx = -x**2/denom + 1/sqrt_denom
35 Hyy = -y**2/denom + 1/sqrt_denom
37 Hzz = -z**2/denom + 1/sqrt_denom
39 return np.hstack([Hxx.reshape((-1,1)), Hxy.reshape((-1,1)), Hzx.reshape((-1,1)), Hyy.reshape((-1,1)), Hzy.reshape((-1,1)), Hzz.reshape((-1,1))])