Pit Capitain wrote:
> On 1 Aug 2002, at 1:47, Daniel Bretoi wrote:
> 
> 
>>Sorry all, I actually checked for a matrix class, but I must have
>>missed it (. Anyway, what I would be interested in is how you would
>>approach the problem WITHOUT using the matrix class.
> 
> 
> I guess using one of my own libraries doesn't qualify either, but 
> here it goes:

Ditto, but anyway, using Enumerable Tools on RAA:

   require 'enum/op'

   a = [[1,2],[1,3],[2,4]]

   aT = EnumerableOperator::diagonal(*[[1,2],[1,3],[2,4]]).to_a

   p aT