I want to find a root of a function. I know that the root exists but not where it can be on the real line, so if I give some upper and lower bound to scipy.optimize.brentq it is likely that there is no change in signs.
Is there any nice way to allow for the limits to expand if there is no sign change? R has an option expand limits that does so. Right now I am doing it manually but it does not seem the best approach.