[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] inner product
From: |
enztec |
Subject: |
Re: [Bug-apl] inner product |
Date: |
Fri, 17 Mar 2017 13:00:10 -0600 |
Hi
I assume you mean the vectors both have same length as their single dimension
(no first or last - the same)
making them into 1 4⍴ arrays then requires the ⍉ use
don't you treat vectors differntly in the gnuapl code from 'true arrays' with 2
(or more dimensions)?
On Fri, 17 Mar 2017 18:18:58 +0100
Juergen Sauermann <address@hidden> wrote:
> Hi,
>
> yes. Because the first dimension of a is 4 and the last dimension of b is
> also 4.
>
> /// Jürgen
>
>
> On 03/17/2017 06:05 PM, address@hidden wrote:
>
> yes last dimension of a must be = to first dimension of b
>
> but then
>
> x←1 2 3 4
> y←1 3 3 3
>
> x+.=y works
>
>
> On Fri, 17 Mar 2017 17:29:24 +0100
> Juergen Sauermann <address@hidden> wrote:
>
> Hi,
>
> the number of columns in a must match the number of rows in b (or the other
> way around,
> I don't quite remember).
>
> Try:
>
> 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
>
> /// Jürgen
>
>
> On 03/17/2017 05:17 PM, address@hidden wrote:
> Hi
>
> what am i missing here?
>
> a←b←5 3⍴⍳8
>
> a=b
>
> +/a=b
>
> a+.=b length error
>
>
>
>
>
>
>