I obviously have missed some things about how to extract elements from arrays in APL and hope that someone can see what I have missed and how I should do to get the expected results in a way that I can reproduce in a meaningful way.
I am relatively new in learning APL and I am more used to languages like Python and C. The data types and array manipulating tools in APL seem to confuse me, a little.
Consider the following code and please tell why the expected (by me) result,
┌→─────┐
│42 666│
└~─────┘
got embedded in something more complex, and possibly a way around that problem. (Using Dyalog APL/S-64, 16.0.30320)
⎕io ← 0
a ← 17 4711 (42 666)
z ← a[2]
an_expected_vector←42 666
]DISPLAY an_expected_vector
┌→─────┐
│42 666│
└~─────┘
]DISPLAY z
┌──────────┐
│ ┌→─────┐ │
│ │42 666│ │
│ └~─────┘ │
└∊─────────┘
Why isn't z
identical to an_expected_vector
?
Thanks ! /Hans