Apply suggestions from code review
Apply suggestions from code review

Co-authored-by: Julien Jerphanion <46f1a0bd5592a2f9244ca321b129902a06b53e03@jjerphan.xyz>
scipy/scipy,scipy/scipy,scipy/scipy,scipy/scipy,scipy/scipy,scipy/scipy