I think they are all working. It's just that the shape of unboxed D is:
   $>D
1 2 1 6 6


-----Original Message-----
From: Brian Schott <[email protected]>
Sent: Tuesday, 9 February 2010 18:31
To: Programming forum <[email protected]>
Subject: Re: [Jprogramming] combine the first 2 axes when 2nd shape is 1


None of the methods are working for a particular data set.

<beware of line wrap there is only 1 line defining D>
D=: ,<2 1 6 6$'  4          bd f rt v   #[ $]   */=  4          bd f
rt v   #$ [] =/*  '

   $,/>D
2 1 6 6
   $,"2&.|: >D
2 1 6 6
   ${."_1> D
1 1 6 6

On Sun, Feb 7, 2010 at 4:14 PM, Zsbán Ambrus <[email protected]> wrote:
> On Sun, Feb 7, 2010 at 9:42 PM, Brian Schott <[email protected]> wrote:
>>        Is there a better way to combine the first two axes
>> of an array when the second axis's shape is 1 than using
>>   $ ,"2&.|: i. 3 1 5 5
>
> Either (,/) (which is optimized), or just ({."_1)
>
> Ambrus
> ----------------------------------------------------------------------
----------------------------------------------------------------------
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