Terrence Brannon wrote:
but what about an array of shape 0,3? How can you index into that vector of
magnitude 3 and get or store data?
array of shape 0,3 is rank-2. a simple example for "store data" like this,
]a=. 0 3$0
]a=. a , 1 2 3
1 2 3
]a=. a , 2 3 4
1 2 3
2 3 4
a is rank-2
b=. ''
]b=. b , 1 2 3
1 2 3
at this point, it looks the same, but b is rank-1,
]b=. b , 2 3 4
1 2 3 2 3 4
so the different is more visible
In this example, it could also set a=. 0 0$0 to get the same result, but not
always possible, depending on context.
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm