This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / optimize / _basinhopping / Metropolis / accept_reject

function

scipy.optimize._basinhopping:Metropolis.accept_reject

source: build-install/usr/lib/python3.14/site-packages/scipy/optimize/_basinhopping.py:321

Signature

def accept_reject(self, res_new, res_old)

Summary

Assuming the local search underlying res_new was successful: If new energy is lower than old, it will always be accepted. If new is higher than old, there is a chance it will be accepted, less likely for larger differences.

Aliases

  • scipy.optimize._basinhopping.Metropolis.accept_reject