相当于NumPy的Ruby [英] Ruby equivalent of NumPy

查看:115
本文介绍了相当于NumPy的Ruby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够获得平均值,中位数,百分位数等.我一直在寻找,找不到任何类似的东西.我意识到Ruby在科学界的使用率不是很高,但是Ruby中至少必须存在一个非常基本的库,该库可以进行数学运算,对吗?

I'd like to be able to get averages, medians, percentiles, etc. I've been looking all over and can't find anything like it. I realize that Ruby isn't used very much in the scientific world, but there has to exist at least a very basic library in Ruby that does math, right?

推荐答案

ruby​​ narray怎么样?

How about ruby narray?

http://narray.rubyforge.org/

如果您查看这些方法,则有一个统计部分涵盖了您的用例:

If you look at the methods, there is a section on statistics that covers your use cases:

http://narray.rubyforge.org/SPEC.en

您可能还希望查看与GSL的红宝石绑定:

You might also want to look at the ruby bindings to the GSL:

http://ruby-gsl.sourceforge.net/

这篇关于相当于NumPy的Ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆