def jac(self):
def _jacobian(x):<EOL><INDENT>dz = self.jacobian(x)<EOL>if sps.issparse(dz): dz = dz.toarray()<EOL>dz = np.asarray(dz)<EOL>return np.squeeze(dz)<EOL><DEDENT>return _jacobian<EOL>
pf.jac() yields a jacobian calculation function for the given potential function pf that is
  appropritate for passing to a minimizer.