It appears to only work with integers.

Don Kelly

On 2020-11-15 10:23 a.m., Henry Rich wrote:
On reflection I am not going to implement (4 $. $.) in special code.

The fundamental operation is 'express the numbers in y, which are elements of (i. #@, x), as index lists into x'.  This is achieved by

   (#:~ $)~

y can have any shape.  (4 $. $.) works only on an argument that happens to have the shape of x.  I don't think that's a special case worth coding for.

Henry Rich

On 11/13/2020 10:54 PM, Roger Hui wrote:
Another candidate is >,{i.&.>$x .  (4 $. $.) has the "problem" that indices
corresponding to 0 elements are excluded.



On Fri, Nov 13, 2020 at 6:59 PM Henry Rich <[email protected]> wrote:

Ric Sherlock has suggested that (4 $. $.) would be an idiom worthy of
special code.  I agree & will do it sometime.


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


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

Reply via email to