quantile

sherpa.utils.quantile(sorted_array, f)[source]

Return the quantile element from sorted_array, where f is [0,1] using linear interpolation.

Based on the description of the GSL routine gsl_stats_quantile_from_sorted_data - e.g. http://www.gnu.org/software/gsl/manual/html_node/Median-and-Percentiles.html but all errors are my own.

sorted_array is assumed to be 1D and sorted.