diff --git a/HISTORY.md b/HISTORY.md index 925a84be6..1c6c44e99 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,7 +5,9 @@ - Fix #2989: use one-based indices in `print` in the parser (#3009). Thanks @dvd101x. - Fix #2936: `mod` sometimes giving wrong results due to internal round-off - errors (#3011). Thanks @praisennamonu1. + errors (#3011). Thanks @praisennamonu1. +- Internal refactor of `quantileSeq`, and fixed the embedded help (#3003). + Thanks @dvd101x. # 2023-09-05, 11.11.0 diff --git a/src/function/statistics/quantileSeq.js b/src/function/statistics/quantileSeq.js index f647309dd..4d35171b7 100644 --- a/src/function/statistics/quantileSeq.js +++ b/src/function/statistics/quantileSeq.js @@ -7,6 +7,8 @@ const name = 'quantileSeq' const dependencies = ['typed', '?bignumber', 'add', 'subtract', 'divide', 'multiply', 'partitionSelect', 'compare', 'isInteger', 'smaller', 'smallerEq', 'larger'] export const createQuantileSeq = /* #__PURE__ */ factory(name, dependencies, ({ typed, bignumber, add, subtract, divide, multiply, partitionSelect, compare, isInteger, smaller, smallerEq, larger }) => { + const apply = createApply({ typed, isInteger }) + /** * Compute the prob order quantile of a matrix or a list with values. * The sequence is sorted and the middle value is returned. @@ -41,9 +43,6 @@ export const createQuantileSeq = /* #__PURE__ */ factory(name, dependencies, ({ * @param {Boolean} sorted=false is data sorted in ascending order * @return {Number, BigNumber, Unit, Array} Quantile(s) */ - - const apply = createApply({ typed, isInteger }) - return typed(name, { 'Array | Matrix, number | BigNumber': (data, p) => _quantileSeqProbNumber(data, p, false), 'Array | Matrix, number | BigNumber, number': (data, prob, dim) => _quantileSeqDim(data, prob, false, dim, _quantileSeqProbNumber),