Using SciPy optimization in Jupyter