MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / flattenArguments

Function flattenArguments

src/compute-engine/library/statistics.ts:648–656  ·  view source on GitHub ↗
(
  args: ReadonlyArray<Expression>
)

Source from the content-addressed store, hash-verified

646 complexity: 1200,
647 broadcastable: false,
648 signature: '((collection<any>|number|distribution)+) -> number',
649 // A data-consuming aggregate (§3.C): result type is the numeric base
650 // with NO `| missing` arm (I6 absorption) — `number`, NOT `real`,
651 // because every arm of the wide type is reachable. An absent datum or
652 // empty input evaluates to `NaN` (`Mean([1, NaN, 3])`, `Mean([])`);
653 // infinite data keeps its limit (`Mean([1, +oo, 3])` is `+oo`); and
654 // complex data has a complex mean (`Mean([1, 1+2i])` is `1 + i`).
655 // Three named arms would be needed to say less, so the base type says
656 // it in one token.
657 //
658 // The operand carrier stays `collection<any>` — the ABSENCE-admitting
659 // top — because the §3.C rule requires `[1, Missing, 3]` to REACH this

Callers 3

flattenScalarsFunction · 0.85
flattenBigScalarsFunction · 0.85
exactDataFunction · 0.85

Calls 1

eachMethod · 0.65

Tested by

no test coverage detected