|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] inner product |
Date: | Fri, 17 Mar 2017 18:44:24 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi, that would be more like an outer product: a←b←5 3⍴⍳8 ⍴a∘.=b 5 3 5 3 The inner product reduces away the two middle axes of the outer product. In the ⍉b case you have ⍴a∘.=⍉b 5 3 3 5 ⍴a+.=⍉b 5 5 That is, BTW, the reason while the last axis of a and the first axis of b must match; otherwise the right function of . would get a length error. /// Jürgen On 03/17/2017 06:14 PM, address@hidden
wrote:
thanks i have no clue how the result of a+.=⍉b as 5x5 result is obtained from a 5x3 array and 3x5 array shouldn't it be a 15x15 result ... but i guess i really just want to use +/a=b :) On Fri, 17 Mar 2017 12:26:42 -0400 Christian Robert <address@hidden> wrote:a+.=⍉b 3 0 0 0 0 0 3 0 0 0 0 0 3 0 0 0 0 0 3 0 0 0 0 0 3 On 2017-03-17 12:17, address@hidden wrote:Hi what am i missing here? a←b←5 3⍴⍳8 a=b +/a=b a+.=b length error |
[Prev in Thread] | Current Thread | [Next in Thread] |