With the reverse order, I think that it should be
``
return np.r_[1, precision[sl]], np.r_[0, recall[sl]], thresholds[sl] 
``