Austin Ziegler wrote: >On Sat, 9 Nov 2002 07:42:15 +0900, Ted wrote: > > >>Does Ruby support other than 1 dimensional arrays? >> >> > >A Ruby array element can contain any Ruby object, so you can have an >Array of Arrays. > >foo = [ [1, 2, 3], [4, 5, 6], [7, 8, 9]] > >p foo[0][0] # => 1 >p foo[2][2] # => 2 > >-austin > >-- Austin Ziegler, austin / halostatue.ca on 2002.11.08 at 17.53.23 > It does, but that's a slow implementation, though flexible. I have been trying to figure out NArray, and bouncing. This is less flexible, but much faster. (However it depends on knowing the size of all but the last dimension of the array at indexing time -- like the way that Fortran does it, only a bit more dynamic.)