Method: MatRuby::MatRuby.create
- Defined in:
- lib/MatRuby/MatRuby.rb
.create(arr) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/MatRuby/MatRuby.rb', line 15 def self.create(arr) # row vector mat = Array.new(arr.size) arr.each_with_index do |row_vector, index| mat[index] = row_vector end return mat end |