I’m almost sure you already know this idiom:
]x=. 0 4 5 e.~ i.3 3
1 0 0
0 1 1
0 0 0
where =: $#:I.@,
where x
0 0
1 1
1 2
... and you know that I.x is filling in zeros in rows 0 & 2 to match the length
of row 1,
so I’ve probably missed the point!
Sadly, Roger isn’t around to explain why monadic I. doesn’t act as “where”.
Perhaps Henry knows.
Cheers,
Mike
Sent from my iPad
> On 25 Oct 2021, at 08:10, Elijah Stone <[email protected]> wrote:
>
> ]x=. 0 4 5 e.~ i.3 3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm