Accidental Nested Arrays?
Posted: Mon Jul 22, 2013 3:17 pm
Take the example:
Which doesn't make any sense to me.... I was expecting a similar vector as from the first display output, instead I get a nested vector... What is the correct way to structure this to get the output I want? (i.e. a vector containing three elements just like what I'd have if I ran togethers ← ones twos ones)
(Sorry for yet another question... I am searching and researching all the resources I have/can find...)
Code: Select all
ones ← 2 2⍴ 1
twos ← 2 2⍴2
togethers ← ones twos
togethers
┌→──┬───┐
│1 1│2 2│
│1 1↓2 2↓
└~─→┴~─→┘
⍝All as expected so far, but then...
togethers ← togethers ones
togethers
┌→────────┬───┐
│┌→──┬───┐│1 1│
││1 1│2 2││1 1│
││1 1↓2 2↓│ │
│└~─→┴~─→┘│ ↓
└────────→┴~─→┘
Which doesn't make any sense to me.... I was expecting a similar vector as from the first display output, instead I get a nested vector... What is the correct way to structure this to get the output I want? (i.e. a vector containing three elements just like what I'd have if I ran togethers ← ones twos ones)
(Sorry for yet another question... I am searching and researching all the resources I have/can find...)