From: Olivier Saut Date: 2012-09-09T16:31:01+09:00 Subject: Re: Using ruby for scientific computing Thanks for your answer ! I also really like Ruby and would prefer to avoid switching to Python. I'll have a look at octave-ruby. I have also found a project http://sciruby.com that seems to be interesting. I am not sure how far it has improved the situation for ruby in scientific computing though. Best regards, Le 8 sept. 2012 à 20:26, Admin Tensor a écrit : > Olivier Saut wrote in post #1075138: >> Hi all, >> >> For pedagogic purposes, I am trying to solve simple partial differential >> equations (say a diffusion equation on a regular mesh in 2D) with Ruby. >> Using the NArray gem, I have built a satisfactory tool from an interface >> (and ease of use) point of view but the performance are suboptimal. > ....... >> I am wondering what is the best way to tackle this performance problem : >> 1. Improve the ruby code (and how? :) Should I avoid using hashes? >> 2. Write an extension to perform these operations in C. BTW is there a >> way to access directly NArray data (without copy) from a C extension? >> 3. Use a wrapper like Ruby-lapack >> ( >> https://rubyforge.org/projects/ruby-lapack/ >> ). >> >> What do you think? >> >> Thanks for your help ! > > Hi, > > Because it seems that you emphasize on performance, I think the best way > is to use GNU Octave for dealing with the sparse matrices. There is a > Ruby gem (octave-ruby) to bridge between Ruby and Octave objects. > > I really like Ruby, but for scientific computing I think for now Python > has better libraries. > > Regards, > > Bill > > -- > Posted via http://www.ruby-forum.com/. > - Olivier