> • takes a right argument Y that is a numeric scalar or non-empty vector.
> • takes a left argument X that represents the number of neighboring elements on either side of each element in Y.
> • returns a numeric vector or scalar where each element is the average (mean) of the corresponding element in Y and its X neighbors on either side. If an element has fewer than X neighbors on either side, replicate the first and last values as necessary to make X neighbors.
So you'd add a left argument or maybe a row to the right operand, with one edge spec per dimention, 0–4 for Zero (current behaviour), Replicate (what we'd need here), etc.
To avoid having to pad, Stencil could either omit padding info when impossible, or it could switch to giveone mask per dimension (but that would need ⌿ to be extended to handle one mask per dimension too) or let it return a nested argument (extending ↑ and ↓ to do multiple take/drop operations at once).
Let me see if I can do the fill-with-edge-value, without padding first (though it won't work on small args).
You mean extending ↑/↓ or switching to and extending ⌿?
I would like to extend both, but I think I prefer ⌺ keeping its behaviour. Having the actual amount of padding is often useful, as we just saw. It'd be more complicated to compute the leading and trailing 1s.
@Silas I think I prefer extending the right operand, as it anyway needs a column per dimension. I was using the left argument to indicate switching to a ⌿-based left argument, but then I came up with the extension to ↑ and ↓.
Does NARS2000's § only work as an operand to ⍦, or does a standalone function for symmetric difference also exist? I can't find documentation for the latter and currently have no access to a Windows machine to try it out myself