NArray is an Numerical N-dimensional Array class. Supported element types are 1/2/4-byte Integer, single/double-precision Real/Complex, and Ruby Object. This extension library incorporates fast calculation and easy manipulation of large numerical arrays into the Ruby language. NArray has features similar to NumPy, but NArray has vector and matrix subclasses.
很棒的东东,特别是你需要处理一些数学矩阵运算的时候。它可以允许你创建任何维数的矩阵,并且提供了必要的数学运算支持。有一些demo可以学习,不难掌握。
check this out: http://narray.rubyforge.org/
NArray 是 Ruby 中的一个数值 N 维数组类,支持多种数据类型,包括整数、实数、复数及 Ruby 对象。该库集成了快速计算和易于操作的大规模数值数组功能,特别适合进行数学矩阵运算。NArray 提供了类似 NumPy 的功能,但还包含了向量和矩阵子类。此外,NArray 支持创建任意维度的矩阵,并提供必要的数学运算支持。
211





