MIN Add a scipy based version