[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wrong result from dyadic ¨ with empty argument
From: |
Ben Harris |
Subject: |
Wrong result from dyadic ¨ with empty argument |
Date: |
Thu, 28 May 2020 17:07:47 +0100 (BST) |
User-agent: |
Alpine 2.11 (DEB 23 2013-08-11) |
Thank you for GNU APL! I think I've found a bug in SVN revision 1286.
Applying the dyadic ¨ ('each') operator where one or both arguments is an
empty array results in a scalar rather than an empty array as the result:
(0⍴0)+¨1
0
(0⍴0)+¨(0⍴0)
0
1+¨(0⍴0)
0
⍴((0⍴0)+¨(0⍴0))
⍴⍴((0⍴0)+¨(0⍴0))
0
Both ISO/IEC 13751 and the IBM APL2 Reference seem to me to say that the
shape of the result should be the shape of the non-scalar argument, so the
first three expressions above should all return 0⍴0 rather than 0.
--
Ben Harris
- Wrong result from dyadic ¨ with empty argument,
Ben Harris <=