elasticsearch-ruby

https://github.com/elastic/elasticsearch-ruby

Ruby

Ruby integrations for Elasticsearch

Matrix.empty

Creates a empty matrix of +row_count+ x +column_count+.
At least one of +row_count+ or +column_count+ must be 0.

  m = Matrix.empty(2, 0)
  m == Matrix[ [], [] ]
    => true
  n = Matrix.empty(0, 3)
  n == Matrix.columns([ [], [], [] ])
    => true
  m * n
    => Matrix[[0, 0, 0], [0, 0, 0]]

Source | Google | Stack overflow

Edit

git clone [email protected]:elastic/elasticsearch-ruby.git

cd elasticsearch-ruby

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Matrix-empty-for-pr


# Commit to git

git add git commit -m "better docs for Matrix.empty"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Matrix-empty-for-pr

hub pull-request


# Celebrate!