[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] Outer product with replicate error
From: |
Xiao-Yong Jin |
Subject: |
Re: [Bug-apl] Outer product with replicate error |
Date: |
Sat, 14 May 2016 14:30:42 -0500 |
> On May 14, 2016, at 1:54 PM, Ala'a Mohammad <address@hidden> wrote:
>
> Isn't it the same as using reshape instead?
>
> 3 0 2 ∘.⍴ 5 1 7
> 5 5 5 1 1 1 7 7 7
>
> 5 5 1 1 7 7
In this case, yes. If you have nested structure, no.
>
> Best,
>
> Ala'a
>
> On Sat, May 14, 2016 at 10:31 PM, Xiao-Yong Jin <address@hidden> wrote:
>>
>>> On May 14, 2016, at 7:51 AM, David Tran <address@hidden> wrote:
>>>
>>> Hi,
>>>
>>> Newbie study "MasteringDyalogAPL"; got error on page #388 example:
>>>
>>> 3 0 2 ∘./ 5 1 7
>>> SYNTAX ERROR
>>> 3 0 2∘./5 1 7
>>> ^ ^
>>>
>>> bug? ( or this is a specify feature of Dyalog and not APL2 ? )
>>
>> It’s documented in the info page of gnu apl. A feature (bug?) of the parser
>> treats / as an operator in this case. Simple workaround would be
>>
>> 3 0 2 ∘.{⍺/⍵} 5 1 7
>> 5 5 5 1 1 1 7 7 7
>>
>> 5 5 1 1 7 7
>>
>> I have too limited experience to say whether it is good or bad. Perhaps the
>> parser should accept some exceptional cases?
>>
>> Best,
>> Xiao-Yong
>>
>>