A blog to record helpful tips/hints/tricks/etc. that I come across during my scientific career regarding science, computers, and research. I love learning and disseminating Knowledge.
Tuesday, September 18, 2012
Avoid integer division when programming
I didn't realize I was doing this but noticed I did have a problem for one of my Python scripts. I was doing 1/2 which is apparently a no-no in programming. I fixed it by doing 0.5*... Other ways include 1.0/2 etc.
No comments:
Post a Comment