|
1 | | -# Numo::NArray - New NArray class library for Ruby/Numo (NUmerical MOdule) |
2 | | - |
3 | | -[](http://mybinder.org/repo/ruby-numo/narray) |
4 | | -[](https://travis-ci.org/ruby-numo/narray) |
5 | | - |
6 | | -[GitHub](https://github.com/ruby-numo/narray) |
7 | | - | [RubyGems](https://rubygems.org/gems/numo-narray) |
8 | | - |
9 | | -Numo::NArray is an Numerical N-dimensional Array class |
10 | | -for fast processing and easy manipulation of multi-dimensional numerical data, |
11 | | -similar to numpy.ndaray. |
12 | | -This project is the successor to [Ruby/NArray](http://masa16.github.io/narray/). |
13 | | - |
14 | | -under development |
15 | | - |
16 | | -## Documentation |
17 | | -All documents are primitive. |
18 | | - |
19 | | -* [Numo::NArray API Doc](http://ruby-numo.github.io/narray/narray/frames.html) |
20 | | -* [Numo::NArray vs numpy](https://github.com/ruby-numo/narray/wiki/Numo-vs-numpy) |
21 | | -* [Numo::NArray vs ndarray](https://github.com/ruby-numo/narray/wiki/Numo-vs-ndarray) |
22 | | -* [Numo::NArray Overview](https://github.com/ruby-numo/narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81) (in Japanese) |
23 | | - |
24 | | -## Related Projects |
25 | | -* [Numo::Linalg](https://github.com/ruby-numo/linalg) - Linear Algebra library with [LAPACK](http://www.netlib.org/lapack/). |
26 | | -* [Numo::GSL](https://github.com/ruby-numo/gsl) - Ruby interface for [GSL (GNU Scientific Library)](http://www.gnu.org/software/gsl/). |
27 | | -* [Numo::FFTE](https://github.com/ruby-numo/ffte) - Ruby interface for [FFTE (A Fast Fourier Transform library with radix-2,3,5)](http://www.ffte.jp/). |
28 | | -* [Numo::Gnuplot](https://github.com/ruby-numo/gnuplot) - Simple and easy-to-use Gnuplot interface. |
29 | | - |
30 | | -## Installation |
31 | | -### Requirement |
32 | | -Ruby ver 2.1 and later. |
33 | | - |
34 | | -### Ubuntu, Debian, Bash on Windows |
35 | | -```shell |
36 | | -apt install -y git ruby gcc ruby-dev rake make |
37 | | -gem install specific_install |
38 | | -gem specific_install https://github.com/ruby-numo/narray.git |
39 | | -``` |
40 | | - |
41 | | -## Quick start |
42 | | -An example |
43 | | -```ruby |
44 | | -[1] pry(main)> require "numo/narray" |
45 | | -=> true |
46 | | -[2] pry(main)> a = Numo::DFloat.new(3,5).seq |
47 | | -=> Numo::DFloat#shape=[3,5] |
48 | | -[[0, 1, 2, 3, 4], |
49 | | - [5, 6, 7, 8, 9], |
50 | | - [10, 11, 12, 13, 14]] |
51 | | -[3] pry(main)> a.shape |
52 | | -=> [3, 5] |
53 | | -[4] pry(main)> a.ndim |
54 | | -=> 2 |
55 | | -[5] pry(main)> a.class |
56 | | -=> Numo::DFloat |
57 | | -[6] pry(main)> a.size |
58 | | -=> 15 |
59 | | -``` |
60 | | -For more examples, check out this [narray version of 100 numpy exercises](https://github.com/ruby-numo/narray/wiki/100-narray-exercises) (and the [IRuby Notebook](https://github.com/ruby-numo/narray/blob/master/100-narray-exercises.ipynb)). |
| 1 | +# Numo::NArray - New NArray class library for Ruby/Numo (NUmerical MOdule) |
| 2 | + |
| 3 | +[](http://mybinder.org/repo/ruby-numo/numo-narray) |
| 4 | +[](https://travis-ci.org/ruby-numo/numo-narray) |
| 5 | + |
| 6 | +[GitHub](https://github.com/ruby-numo/numo-narray) |
| 7 | + | [RubyGems](https://rubygems.org/gems/numo-narray) |
| 8 | + |
| 9 | +Numo::NArray is an Numerical N-dimensional Array class |
| 10 | +for fast processing and easy manipulation of multi-dimensional numerical data, |
| 11 | +similar to numpy.ndaray. |
| 12 | +This project is the successor to [Ruby/NArray](http://masa16.github.io/narray/). |
| 13 | + |
| 14 | +under development |
| 15 | + |
| 16 | +## Documentation |
| 17 | +All documents are primitive. |
| 18 | + |
| 19 | +* [Numo::NArray API Doc](http://ruby-numo.github.io/narray/narray/frames.html) |
| 20 | +* [Numo::NArray vs numpy](https://github.com/ruby-numo/numo-narray/wiki/Numo-vs-numpy) |
| 21 | +* [Numo::NArray vs ndarray](https://github.com/ruby-numo/numo-narray/wiki/Numo-vs-ndarray) |
| 22 | +* [Numo::NArray Overview](https://github.com/ruby-numo/numo-narray/wiki/Numo::NArray%E6%A6%82%E8%A6%81) (in Japanese) |
| 23 | + |
| 24 | +## Related Projects |
| 25 | +* [Numo::Linalg](https://github.com/ruby-numo/numo-linalg) - Linear Algebra library with [LAPACK](http://www.netlib.org/lapack/). |
| 26 | +* [Numo::GSL](https://github.com/ruby-numo/numo-gsl) - Ruby interface for [GSL (GNU Scientific Library)](http://www.gnu.org/software/gsl/). |
| 27 | +* [Numo::FFTW](https://github.com/ruby-numo/numo-fftw) - Ruby/Numo interface to [FFTW (A Discrete Fourier Transform library](http://www.fftw.org/). |
| 28 | +* [Numo::FFTE](https://github.com/ruby-numo/numo-ffte) - Ruby interface for [FFTE (A Fast Fourier Transform library with radix-2,3,5)](http://www.ffte.jp/). |
| 29 | +* [Numo::Gnuplot](https://github.com/ruby-numo/numo-gnuplot) - Simple and easy-to-use Gnuplot interface. |
| 30 | + |
| 31 | +## Installation |
| 32 | +### Requirement |
| 33 | +Ruby ver 2.1 and later. |
| 34 | + |
| 35 | +### Ubuntu, Debian, Bash on Windows |
| 36 | +```shell |
| 37 | +apt install -y git ruby gcc ruby-dev rake make |
| 38 | +gem install specific_install |
| 39 | +gem specific_install https://github.com/ruby-numo/numo-narray.git |
| 40 | +``` |
| 41 | + |
| 42 | +## Quick start |
| 43 | +An example |
| 44 | +```ruby |
| 45 | +[1] pry(main)> require "numo/narray" |
| 46 | +=> true |
| 47 | +[2] pry(main)> a = Numo::DFloat.new(3,5).seq |
| 48 | +=> Numo::DFloat#shape=[3,5] |
| 49 | +[[0, 1, 2, 3, 4], |
| 50 | + [5, 6, 7, 8, 9], |
| 51 | + [10, 11, 12, 13, 14]] |
| 52 | +[3] pry(main)> a.shape |
| 53 | +=> [3, 5] |
| 54 | +[4] pry(main)> a.ndim |
| 55 | +=> 2 |
| 56 | +[5] pry(main)> a.class |
| 57 | +=> Numo::DFloat |
| 58 | +[6] pry(main)> a.size |
| 59 | +=> 15 |
| 60 | +``` |
| 61 | +For more examples, check out this [narray version of 100 numpy exercises](https://github.com/ruby-numo/numo-narray/wiki/100-narray-exercises) (and the [IRuby Notebook](https://github.com/ruby-numo/numo-narray/blob/master/100-narray-exercises.ipynb)). |
| 62 | + |
| 63 | +## Development |
| 64 | + |
| 65 | +### Build |
| 66 | + |
| 67 | +```shell |
| 68 | +ruby setup.rb |
| 69 | +``` |
| 70 | + |
| 71 | +### Run tests |
| 72 | + |
| 73 | +```shell |
| 74 | +bundle install |
| 75 | +bundle exec rake test |
| 76 | +``` |
| 77 | + |
| 78 | +Tips: You may run tests defined in a specified line as: |
| 79 | + |
| 80 | +```shell |
| 81 | +bundle exec ruby test/bit_test.rb --location 27 |
| 82 | +``` |
0 commit comments