Also,
   {. , 34
is a simple way to convert a vector to a scalar, or, for higher-ranked arrays,
   ({.@:,) .

On Sun, May 6, 2012 at 2:52 AM, Roger Hui <rogerhui.can...@gmail.com> wrote:
> You can do this the same as you do in APL, ''$,34.
>
> I remember discussing this with Fred Appleyard when I was a summer student
> in IPSA Calgary in 1975.  I opined that you "can not make a scalar from a
> vector".  He immediately showed me ''$,34, (,34)[0], +/,34, etc.
>
>
>
> On Sat, May 5, 2012 at 11:46 PM, Linda Alvord <lindaalv...@verizon.net>wrote:
>
>> J Vocabulary, Primer, Single atom array
>>
>> An array with a single atom is referred to as a singleton. All singletons
>> with the same atom display the same way. However, the fact that they have
>> different ranks affects how verbs act on them. This can be a pitfall for
>> beginners. It is important to remember that if it displays like an atom,
>> but
>> does not behave like one, then check its rank.
>>
>> Is there somewhere in the vocabulary where it mentions how to change a
>> single element list to an atom (shape 1 to shape empty)
>>
>>   $34
>>   $,34
>> 1
>>   #34
>> 1
>>   #,34
>> 1
>>
>> Isn't the problem with shapes rather than rank?
>>
>> In any case, I have a mental lapse and can't seem to change  ,34  to  34 .
>>
>> Thanks in advance.
>>
>> Linda
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to