I wrote:

> But, if I understand you correctly, you're suggesting Roger 
> assume   4&$.  refers to all SCALAR 1s; 

And: 
>  [that] 4&$.^:_1  should produce a two dimensional 
>  boolean array, and both axes should be sparse.   

I should've said "  4&$.^:_1  should produce a boolean array with the same rank 
as  4&$.  where all axes are sparse" (i.e. not
assumed a table).

But you know what?  Even if you do that, you're still sunk.  Remember this 
thread?

   http://www.jsoftware.com/pipermail/general/2006-April/026875.html  

Same problem.  Even if you got the rank right viz-a-viz  4&$.  , you still 
don't know the original shape.  How long would you make
each axis?

Now your request for  4&$.^:_1  would have to run something like  "  s =. 
4&$.^:_1 t   should produce a boolean array with rank
#$t  , and shape  1+>./t  , with 1s at the atoms specified by (<"1 t) { s  and 
zero elsewhere".  Is that really what you want?  

If you can say all that, isn't it easier just to code:

           s =. 1 (<"1 t) } 0 $~ 1 + >./ t 

or any of the other solutions given in this thread?

-Dan

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

Reply via email to