Reputation: 1473
I am producing a matrix of pairs (= nested vectors) like so:
x←⍳10
y←⍳10
x∘.,y
But for further processing I need to have the pairs in one vector of pairs. If I apply ravel:
,/x∘.,y
then the pairs are not anymore nested. How to transform the matrix into a vector and retain the nested pairs?
Upvotes: 4
Views: 118
Reputation: 7616
You just need to ravel the matrix:
,x∘.,y
This reshapes the matrix into a vector containing the same elements in ravel order.
Upvotes: 5