In [1]:
import scipy
import scipy.optimize

def f(x):
    return x**2 - 10
In [2]:
print(scipy.optimize.brentq(f, -10, 0))
print(scipy.optimize.brentq(f, 10, 0))
-3.1622776601683795
3.1622776601683795
In [3]:
# Find f roots
#scipy.optimize.fixed_point
#scipy.optimize.brentq
#scipy.optimize.brenth
#scipy.optimize.ridder
#scipy.optimize.bisect
#scipy.optimize.newton