Closed bkDJ closed 5 months ago
⍏
first (though ⍖
would yield identical outputs)÷2/+
before landing on what I submitted, but your proposal raises an error with empty input, and since the other aggregating Uiuisms return NaN
for that edge case, I wanted to have the same behavior. All my attempts to do some kind of ⬚NaN
felt contrived and seemed too long for what was being accomplished. An array's median should be identical to its arithmetic mean if there are 0, (or 1, or 2) elements which is why I settled on the Mean (KeepSortedCenter if HasMoreThanTwoElems)
structure.What do you think?
Ah, then perhaps ÷2/+⊏⊟⊃⌊⌈÷2-1⧻⟜(⊏⍏.)
.
I don't think empty should return NaN
. It should error.
The latest commit should make it ok 🙂
Thanks for this! I think maybe
÷2/+⊏⊟⊃⌊⌈÷2-1⧻.
would be preferable?