CLN: replace pandas.compat.scipy.scoreatpercentile with numpy.percentile by gdraps · Pull Request #6810 · pandas-dev/pandas (original) (raw)

@jreback, sorry for the delay, but I've added a second commit to this PR with:

    TypeError: ufunc 'multiply' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'  

No idea why np.percentile wasn't used originally, but will note that scipy.stats.scoreatpercentile existed first. Perhaps, when the scipy dependency was removed from pandas, the difference in rounding made copying scoreatpercentile the easiest way forward. Will also note that scipy has deprecated scoreatpercentile in favor of np.percentile.