SciRuby / daru

Data Analysis in RUby
BSD 2-Clause "Simplified" License
1.04k stars 140 forks source link

Add to_nmatrix method in Daru::Vector #212

Closed lokeshh closed 8 years ago

lokeshh commented 8 years ago

Daru::DataFrame and Daru::Vector has to_matrix method to convert to Matrix object but no method in Daru::Vector to convert to NMatrix object. This PR accomplishes that. In addition it adds is_numeric? method to decide if vector contain all numeric values or not.

lokeshh commented 8 years ago

This method will be useful to replace Matrix with NMatrix in Statsample-GLM.

v0dro commented 8 years ago

In Ruby you can get away with just numeric? instead of is_numeric? since it allows question marks.

Make that change and I'll merge.

lokeshh commented 8 years ago

I just found out that there's already numeric? implemented in Daru. So, I've removed is_numeric? completely and now using numeric? now.

v0dro commented 8 years ago

Rebase against current master and I'll merge.

lokeshh commented 8 years ago

This can be merged now. Also could a Daru release be done now, so I can make sure Statsample-GLM build is passing and Formula Language PR can be merged.