bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] A couple of bugs, and a question on the power operator


From: Juergen Sauermann
Subject: Re: [Bug-apl] A couple of bugs, and a question on the power operator
Date: Sun, 14 Aug 2016 16:18:57 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Louis,

thanks, now I see what you meant. Fixed in SVN 784.

/// Jürgen


On 08/14/2016 07:19 AM, Louis de Forcrand wrote:
About the axis error: I’m pretty sure that what you’re getting isn’t entirely correct.
Maybe the ISO standard differs, but what I read is that catenate with fractional axis
means that a new axis is created between the two whole axis surrounding it. In
addition, if the axis specified is less than one under the index origin or over the
higher of the two ranks of its arguments, the result is formed by catenating the
arguments along this new axis.
In ⎕IO←1, the first axis is #1, so to catenate two matrices to form the planes of
a “cube”, one would use ,[.5]. In ⎕IO←0, this would be ,[¯.5]. What I wanted to do
is catenate two vectors along a new leading axis so as to form two-row a matrix
where each row is one of the original vectors. ,[¯.5] would be the function to use then;
,[.5] would form a new tailing axis, so the argument vectors would be “zipped” together.
In other words, if V1 and V2 are vectors, and ⎕IO←1,

(V1,[.5]V2)≡⍉V1,[1.5]V2

If the ISO standard differs, then it is in conflict with Dyalog and NARS APL.

Louis

On 13 Aug 2016, at 10:31, Juergen Sauermann <address@hidden> wrote:

{((1↓X)Y((⊃X),Z)),[.5]X(1↓Y)((⊃Y),Z)⊣(X Y Z)←⍵}g d ⍬



reply via email to

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