Apply suggestions from code review
Apply suggestions from code review

[skip azp] [skip actions]

Co-authored-by: Pamphile Roy <5382f7c16494af1b573fda9cacaa4290463e84b1@gmail.com>
perimosocordiae/scipy,WarrenWeckesser/scipy,anntzer/scipy,anntzer/scipy,andyfaff/scipy,scipy/scipy,ilayn/scipy,Stefan-Endres/scipy,mdhaber/scipy,vigna/scipy,WarrenWeckesser/scipy,mdhaber/scipy,andyfaff/scipy,endolith/scipy,vigna/scipy,endolith/scipy,endolith/scipy,Stefan-Endres/scipy,perimosocordiae/scipy,perimosocordiae/scipy,mdhaber/scipy,scipy/scipy,andyfaff/scipy,ilayn/scipy,WarrenWeckesser/scipy,endolith/scipy,WarrenWeckesser/scipy,anntzer/scipy,andyfaff/scipy,ilayn/scipy,Stefan-Endres/scipy,mdhaber/scipy,vigna/scipy,perimosocordiae/scipy,rgommers/scipy,Stefan-Endres/scipy,vigna/scipy,andyfaff/scipy,WarrenWeckesser/scipy,ilayn/scipy,Stefan-Endres/scipy,WarrenWeckesser/scipy,ilayn/scipy,anntzer/scipy,scipy/scipy,rgommers/scipy,rgommers/scipy,perimosocordiae/scipy,andyfaff/scipy,ilayn/scipy,scipy/scipy,anntzer/scipy,rgommers/scipy,scipy/scipy,vigna/scipy,Stefan-Endres/scipy,mdhaber/scipy,endolith/scipy,mdhaber/scipy,perimosocordiae/scipy,endolith/scipy,anntzer/scipy,scipy/scipy,rgommers/scipy