Update optimize.py

the step parameter for the local optimization was incorrectly taking the values from the global optimization