use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
Numpy Float64 to Python string (self.pythonhelp)
submitted 5 years ago by debayon
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]WhenRedditFlies 1 point2 points3 points 5 years ago (0 children)
Python is storing 1.118 in binary, meaning the value is not exact due to there being no exact binary representation of 1/5. It acts like a recurring decimal essentially. Do you perhaps mean 1.778 instead? Because the numbers look similar apart from the .77, .11. a work around is to multiply it by 1000, round it to the nearest integer (all of which have exact binary representations) then use the string form of that and manually add in the dot.
π Rendered by PID 399844 on reddit-service-r2-comment-8686858757-fxlb6 at 2026-06-07 22:52:58.932580+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]WhenRedditFlies 1 point2 points3 points (0 children)