Method: Daru::DataFrame#to_matrix
- Defined in:
- lib/daru/dataframe.rb
#to_matrix ⇒ Object
Convert all vectors of type :numeric into a Matrix.
1602 1603 1604 1605 1606 1607 1608 1609 |
# File 'lib/daru/dataframe.rb', line 1602 def to_matrix numerics_as_arrays = [] each_vector do |vector| numerics_as_arrays << vector.to_a if(vector.type == :numeric) end Matrix.columns numerics_as_arrays end |