How do I find the maximum of a function in Python? I could try to hack together a derivative function and find the zero of that, but is there a method in numpy (or other library) that can do it for me?
How do I find the maximum of a function in Python? I could try
Share
You can use
scipy.optimize.fminon the negative of your function.