Ruby/Numo::NArray - New NArray class library
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc rename memo files Feb 25, 2017
ext/numo/narray
fft Update README.md Jul 21, 2013
lib/numo
test Fix triu_indices method to enable k argument Jul 29, 2018
.gitignore new method: kron, refact methods: outer, check_axis May 26, 2017
.travis.yml [CI] Test against Ruby 2.5 Mar 31, 2018
100-narray-exercises.ipynb re-checked exercises no1 through no25 Aug 14, 2016
Dockerfile change repository name to numo-narray Jan 16, 2018
Gemfile create repository Jul 11, 2013
LICENSE change license May 22, 2017
README.md add link to numo-fftw Jan 18, 2018
Rakefile Require Ruby 2.1 or later May 14, 2018
ToDo v0.9.0.7 May 28, 2017
numo-narray.gemspec
setup.rb

README.md

Numo::NArray - New NArray class library for Ruby/Numo (NUmerical MOdule)

Binder Build Status

GitHub | RubyGems

Numo::NArray is an Numerical N-dimensional Array class for fast processing and easy manipulation of multi-dimensional numerical data, similar to numpy.ndaray. This project is the successor to Ruby/NArray.

under development

Documentation

All documents are primitive.

Related Projects

Installation

Requirement

Ruby ver 2.1 and later.

Ubuntu, Debian, Bash on Windows

apt install -y git ruby gcc ruby-dev rake make
gem install specific_install
gem specific_install https://github.com/ruby-numo/numo-narray.git

Quick start

An example

[1] pry(main)> require "numo/narray"
=> true
[2] pry(main)> a = Numo::DFloat.new(3,5).seq
=> Numo::DFloat#shape=[3,5]
[[0, 1, 2, 3, 4],
 [5, 6, 7, 8, 9],
 [10, 11, 12, 13, 14]]
[3] pry(main)> a.shape
=> [3, 5]
[4] pry(main)> a.ndim
=> 2
[5] pry(main)> a.class
=> Numo::DFloat
[6] pry(main)> a.size
=> 15

For more examples, check out this narray version of 100 numpy exercises (and the IRuby Notebook).

Development

Build

ruby setup.rb

Run tests

bundle install
bundle exec rake test

Tips: You may run tests defined in a specified line as:

bundle exec ruby test/bit_test.rb --location 27