def minimize(self, x0, **kwargs):
x0 = np.asarray(x0)<EOL>kwargs = pimms.merge({'<STR_LIT>':self.jac(), '<STR_LIT>':'<STR_LIT>'}, kwargs)<EOL>res = spopt.minimize(self.fun(), x0.flatten(), **kwargs)<EOL>res.x = np.reshape(res.x, x0.shape)<EOL>return res<EOL>
pf.minimize(x0) minimizes the given potential function starting at the given point x0; any
  additional options are passed along to scipy.optimize.minimize.