Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

font_size while the usage of a tag is 100% is not calculated #262

Open
GoogleCodeExporter opened this issue Mar 26, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

Function calculate_cloud:239 in file utils.py.

If you use a tag for each record (100%), so tag_weight for given tag  equals 
max_weight, in my case it equaled 26.0, thresholds[steps-1] also equaled 26.0.

But the comparison of tag_weight <= thresholds[i] returned False.

Probably it is well-known problem of floating point numbers.

I’ve changed  the comparison
if not font_set and tag_weight <= thresholds[i]:
for 
if not font_set and float(str(tag_weight)) <= float(str(thresholds[i])):

And this has solved the problem

Original issue reported on code.google.com by [email protected] on 23 May 2011 at 8:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant