From: Jason Lillywhite Date: 2009-05-08T23:39:56+09:00 Subject: Re: using the GSL library ] > > be careful here. What you just did was load the std library 'matrix' > library, which also defined a Vector constructor - but no method > called 'mean' This is very different than GSL. Thank you. I see that GSL methods must take only GSL::Vectors as arguments rather than 'matrix' Vectors: irb(main):032:0> a = [1,5,7,2] => [1, 5, 7, 2] irb(main):033:0> v1 = GSL::Vector.alloc(a) => GSL::Vector [ 1.000e+00 5.000e+00 7.000e+00 2.000e+00 ] irb(main):034:0> v2 = Vector.elements(a) => Vector[1, 5, 7, 2] irb(main):035:0> GSL::Stats::mean(v1) => 3.75 irb(main):036:0> GSL::Stats::mean(v2) TypeError: wrong argument type Vector from (irb):36:in `mean' from (irb):36 It seems a little odd that we have two kinds of vectors but they are both a 'vector' -- Posted via http://www.ruby-forum.com/.