From: Colin Bartlett Date: 2010-04-27T01:21:51+09:00 Subject: Re: Populate (an array or a matrix) from a vector On Sun, Apr 25, 2010 at 2:10 PM, Paul A. wrote: > ... I have a simple, but very tricky, problem.  I would like to fix it using > an array.  But matix are possibly more appropriate (even if matrix can > not have 3 dimensional values, I think). .. I must confess that from your examples, I'm not at all sure how you want to populate the "array" given the vector, so the following may not be any help at all. But: if you want multidimensional numerical arrays, then NArray might be useful. http://narray.rubyforge.org NArray is an Numerical N-dimensional Array class. Supported element types are 1/2/4-byte Integer, single/double-precision Real/Complex, and Ruby Object. This extension library incorporates fast calculation and easy manipulation of large numerical arrays into the Ruby language. NArray has features similar to NumPy, but NArray has vector and matrix subclasses. ... I haven't used it much myself, and I haven't used it recently. But I did manage to install and use it without using gems, so if I can do it that way it can't be all that difficult to install !