bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] IOTA


From: Nick Lobachevsky
Subject: Re: [Bug-apl] IOTA
Date: Thu, 3 Mar 2016 02:08:00 +0100

There is at least one other degenerate case, namely the "legacy"
singleton, or one element vector.  With a scalar argument, monadic
iota returns a result depth one.  With a vector argument, iota returns
a result depth two.  Except when there is only one element.

      ≡⍳⍳0 ⍝ can't find zilde
2
      ≡⍳⍳1 ⍝ singleton vector case returns result depth one
1
      ≡⍳,1
1
      ≡⍳,2
1
      ≡⍳,42
1
      ≡⍳(15⍴1)⍴1 ⍝ matrix singleton thankfully fails
RANK ERROR
      ≡⍳⍳2
2



reply via email to

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