-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
When we provide equal weights for every word we get such an error:
ruby -I lib wordcloud.rb
/home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:132:in `to_i': NaN (FloatDomainError)
from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:132:in `block in make_scaler'
from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:32:in `block in draw'
from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:28:in `each'
from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:28:in `each_with_index'
from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:28:in `each'
from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:28:in `map'
from /home/arbox/work_space/magic_cloud/lib/magic_cloud/cloud.rb:28:in `draw'
from wordcloud.rb:21:in `<main>'
I didn't investigate the algorithm in cloud.rb:132
((ssize - smin).to_f * koeff + FONT_MIN).to_i
Reactions are currently unavailable