daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::Vector.new_with_size
Create a new vector by specifying the size and an optional value and block to generate values. == Description The *new_with_size* class method lets you create a Daru::Vector by specifying the size as the argument. The optional block, if supplied, is run once for populating each element in the Vector. The result of each run of the block is the value that is ultimately assigned to that position in the Vector. == Options :value All the rest like .new
Edit
git clone [email protected]:sciruby/daru.git
cd daru
open lib/daru/vector.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Daru--Vector-new_with_size-for-pr
# Commit to gitgit add lib/daru/vector.rbgit commit -m "better docs for Daru::Vector.new_with_size"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Daru--Vector-new_with_size-for-pr
hub pull-request
# Celebrate!