MAINT: prevent divide by zero warnings in scipy.optimize BFGS algorithm (#12234)
MAINT: prevent divide by zero warnings in scipy.optimize BFGS algorithm (#12234)

* MAINT: prevent divide by zero warnings in scipy.optimize BFGS algorithm
vigna/scipy,Eric89GXL/scipy,e-q/scipy,grlee77/scipy,e-q/scipy,endolith/scipy,grlee77/scipy,andyfaff/scipy,andyfaff/scipy,zerothi/scipy,e-q/scipy,grlee77/scipy,tylerjereddy/scipy,mdhaber/scipy,scipy/scipy,WarrenWeckesser/scipy,nmayorov/scipy,e-q/scipy,rgommers/scipy,ilayn/scipy,ilayn/scipy,perimosocordiae/scipy,mdhaber/scipy,anntzer/scipy,anntzer/scipy,scipy/scipy,tylerjereddy/scipy,matthew-brett/scipy,Eric89GXL/scipy,nmayorov/scipy,Stefan-Endres/scipy,perimosocordiae/scipy,rgommers/scipy,matthew-brett/scipy,perimosocordiae/scipy,Eric89GXL/scipy,zerothi/scipy,ilayn/scipy,WarrenWeckesser/scipy,anntzer/scipy,grlee77/scipy,zerothi/scipy,zerothi/scipy,WarrenWeckesser/scipy,scipy/scipy,matthew-brett/scipy,rgommers/scipy,anntzer/scipy,tylerjereddy/scipy,nmayorov/scipy,Stefan-Endres/scipy,zerothi/scipy,WarrenWeckesser/scipy,endolith/scipy,rgommers/scipy,andyfaff/scipy,endolith/scipy,andyfaff/scipy,perimosocordiae/scipy,vigna/scipy,vigna/scipy,matthew-brett/scipy,tylerjereddy/scipy,Eric89GXL/scipy,WarrenWeckesser/scipy,andyfaff/scipy,tylerjereddy/scipy,scipy/scipy,mdhaber/scipy,nmayorov/scipy,anntzer/scipy,Eric89GXL/scipy,scipy/scipy,grlee77/scipy,anntzer/scipy,WarrenWeckesser/scipy,ilayn/scipy,rgommers/scipy,Stefan-Endres/scipy,zerothi/scipy,Eric89GXL/scipy,andyfaff/scipy,scipy/scipy,matthew-brett/scipy,endolith/scipy,Stefan-Endres/scipy,nmayorov/scipy,ilayn/scipy,Stefan-Endres/scipy,vigna/scipy,perimosocordiae/scipy,perimosocordiae/scipy,Stefan-Endres/scipy,mdhaber/scipy,endolith/scipy,ilayn/scipy,endolith/scipy,e-q/scipy,vigna/scipy,mdhaber/scipy,mdhaber/scipy