retrying scipy