This would be much better off as a classic question with a compileable MRE that demonstrates the scipy.optimise.root default method going AWOL with a well behaved target function. Are your absolutely sure that your function cannot reach inf anywhere when working in IEEE754 FP format?