?

  99 (i. 2 2)} i. 5 5
 0 99  2  3  4
 5  6  7  8  9
10 11 12 99 14
15 16 17 18 19
20 21 22 23 24
   99 (i. 2 2)} i. 3 4 2
 0  1
99 99
 4  5
 6  7

 8  9
10 11
12 13
14 15

16 17
18 19
20 21
99 99

Each row of m addresses a cell of y, with rank (#$y)-({.$m).

----

This discussion ignores the main difficulty with x m} y, which is that m { y can be all over the place.  m may choose subarrays from all over y, putting them into one array of selected index-lists. x is then distributed across these locations, with one cell of x possibly split across values selected by different atoms of m. It's a mess in general.

----

Elijah, I am not opposed to making exceptions for empty selection, but I haven't seen the value yet.  You gave an example that I don't remember exactly, where you ended up with a shape error on x, but I concluded that you would have needed additional code even with the proposed change.  That was before I went on vacation. Can you make the case again?

Henry Rich



()

On 7/3/2022 7:51 AM, Raul Miller wrote:
On Sun, Jul 3, 2022 at 4:44 AM Elijah Stone <elro...@elronnd.net> wrote:
I am not sure how to feel about this.  Mainly, I am not sure what the
difference is between x m}y and (for high-ranked numeric m) x (<"1 m)} y.  I
am also not sure what the difference is between your proposed semantics and
the existing ones.
After thinking about this a bit, ... perhaps this rephrasing will make sense:

Before J901, m (in x m} y) indexed items of y (and position in m had
to conform with x).

My thinking here was that the leading column of a rank 2 m should
still index items of a high ranked y. In the variant introduced in
J901, that's only the case when the last dimension of m equals the
rank of y.

There's definitely some other issues to consider, involving
conformance, but I think that analogy with the J8 behavior of amend
should serve, there.



--
This email has been checked for viruses by AVG.
https://www.avg.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to