elasticsearch-ruby
https://github.com/elastic/elasticsearch-ruby
Ruby
Ruby integrations for Elasticsearch
Matrix.build
Creates a matrix of size +row_count+ x +column_count+.
It fills the values by calling the given block,
passing the current row and column.
Returns an enumerator if no block is given.
m = Matrix.build(2, 4) {|row, col| col - row }
=> Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
=> a 3x3 matrix with random elementsEdit
git clone [email protected]:elastic/elasticsearch-ruby.git
cd elasticsearch-ruby
open
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Matrix-build-for-pr
# Commit to gitgit add git commit -m "better docs for Matrix.build"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Matrix-build-for-pr
hub pull-request
# Celebrate!