SciRuby / daru

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

Display problems when vector is empty #213

Closed lokeshh closed 8 years ago

lokeshh commented 8 years ago

There are display problem with empty vector.

For example:

[1] pry(main)> dv = Daru::Vector.new []
=> #<Daru::Plotting::Vector::NyaplotLibrary:0x13ae50c>
[2] pry(main)> dv.inspect
ArgumentError: comparison of NilClass with 3 failed
from /home/ubuntu/workspace/daru/lib/daru/formatters/table.rb:43:in `each'
lokeshh commented 8 years ago

Same is the issue with category vector.

v0dro commented 8 years ago

https://github.com/v0dro/daru/commit/d1d778961b9577fe55d622cb84f86e3e65ec4c49