bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] multiple inner product


From: Jay Foad
Subject: Re: [Bug-apl] multiple inner product
Date: Fri, 8 Jul 2016 08:24:36 +0100

On 7 July 2016 at 12:57, Kacper Gutowski <address@hidden> wrote:
On 7 July 2016 at 12:55, Jay Foad wrote:
>       (⊂+/3 4 ⍴ 5 6)≡3 4 +.⍴ 5 6
> 1

Ah, I see what you mean.  But it still wasn't my error, it's really what
ISO says.  It's not equivalent to APL2 definition, nor to Dyalog's one,
and it seems to be wrong altogether.

Which bit of ISO XAPL are you looking at? 9.3.2 Inner Product says:

  Z ← A f . g B

  Informal Description: Z is an array of shape (⍴A)[⍳0⌈¯1+⍴⍴A],(⍴B)[1+⍳0⌈¯1+⍴⍴B].
  The elements of Z are the results obtained from evaluating the _expression_ f/XgY for all
  possible combinations of X and Y, where X is a vector-item along-axis ⍴⍴A of A and Y
  a vector-item along-axis one of B.

So if A and B are vectors, Z is a scalar whose single item is f/AgB. Hence Z itself is ⊂f/AgB.

Jay. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]