[Jprogramming] one element list of an integer to an atom
Ric Sherlock
tikkanz at gmail.com
Thu Mar 29 18:18:26 HKT 2012
To reduce the dimensions of an array in J I tend to use ( ,/ myarray)
$ ,3
1
$ ,/ ,3
On Thu, Mar 29, 2012 at 9:19 PM, Linda Alvord <lindaalvord at verizon.net> wrote:
> a=:1$3
> a
> 3
> 3= 2 3 5 3 4
> 0 1 0 1 0
> a= 2 3 5 3 4
> |length error
> | a =2 3 5 3 4
>
> ".a
> |domain error
> | ".a
> a+5
> 8
>
> Clearly, a is numeric. How can I change a to a numeric atom 3 , rather
> than a one element list 3 ?
>
> I need to find where the 3's are in a list. The result of executing some
> expression has produced a one item list of a 3 .
>
> I think I may have known how in APL once upon a time.
>
> Linda
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list