I'm not sure what you're saying. Replicate does tolerate a scalar on
the right and treat it like a 1-element vector:
(,6)/'a'
aaaaaa
(,6)/,'a'
aaaaaa
Your examples are showing something different, where you're
introducing an extra level of nesting to the right argument but
without changing its rank or shape.
Jay.
On Thu, 26 Nov 2020 at 23:56, Hans-Peter Sorge
<hanspetersorge@netscape.net> wrote:
Hi Jay,
.. not quite:
(,6)/'a'
aaaaaa
(,6)/,¨'a'
a a a a a a
(,6)/'abc'
aaaaaabbbbbbcccccc
(,6)/,¨'abc'
a a a a a a b b b b b b c c c c c c
(,6)/¨,¨'abc'
aaaaaa bbbbbb cccccc
Hans-Peter
Am 26.11.20 um 16:24 schrieb Jay Foad:
Hi,
Here comes my irritation. Or some missing knowledge ....
⍝ 11 - if this is true ( from ⍝3 )
(⊂1 2 3)/¨'ABC'
AAAAAA BBBBBB CCCCCC
⍝ 12 - then this schould be different
(⊂1 2 3)/¨,¨'ABC'
AAAAAA BBBBBB CCCCCC
⍝ expected
A AA AAA B BB BBB C CC CCC
I think they are the same because:
6/¨'abc'
6/¨,¨'abc'
are the same, because:
6/'a'
6/,'a'
are the same, because Replicate tolerates a scalar on the right and
treats it like a 1-element vector.
Jay.