[Jprogramming] {. y produces an array.

Tracy Harms kaleidic at gmail.com
Thu Oct 20 22:51:01 HKT 2011


One need not specify the calculation of rank. It can be discovered as a
limit:

{.^:_


On Thu, Oct 20, 2011 at 10:44 AM, Marshall Lochbaum <mwlochbaum at gmail.com>wrote:

> A more general solution is {.^:(#@$)  , which will strip all the dimensions
> off the array.
>
> Marshall
>
> On Thu, Oct 20, 2011 at 7:34 AM, Raul Miller <rauldmiller at gmail.com>
> wrote:
>
> > {. gets the first item from an array.
> >
> > You might be wanting lim=. {.,y (which will always have lim be a rank 0
> > array).
> >
> > But I do not have a good enough of a mental model of your data
> > structures to say for sure what you want.
> >
> > --
> > Raul
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


More information about the Programming mailing list