Re: simple question on rbgsl vectors

From: baptiste Auguié [mailto:[email protected]]
Sent: Friday, July 06, 2007 1:57 PM

=> GSL::Vector: [ 0.000e+00 1.000e+00 2.000e+00 ]

**** where is should expect ****

=> GSL::Vector: [ 1.000e+00 3.000e+00 4.000e+00 ]

I’ve never used GSL, but it looks like it relies on NArray.
It looks like NArray#[] doesn’t do what you expect for the above, but
(maybe) if you did:
v[ [1,3,4] ]
you might get the result you desire.

thanks for the suggestion, sadly

v[ [1,3,4] ]

returns the wrong result too :frowning:

update: this is apparently a bug in rb-gsl. The author has a patch,
it should be fixed in the next version.