Fixed bfgs algorithm so divide-by-zero does not stop the iterations, it just resets the Hessian approximation.  Changed termination criteria from average gradient to maximum gradient allowed.
Fixed bfgs algorithm so divide-by-zero does not stop the iterations, it just resets the Hessian approximation.  Changed termination criteria from average gradient to maximum gradient allowed.


git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@1019 d6536bca-fef9-0310-8506-e4c0a848fbcf

scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,scipy/scipy-svn,scipy/scipy-svn