Re:Is “data scientist” the new “programmer”?
by darkhorn on Wednesday September 19, 2018 @03:35PM
(#18027055)
What is the result of 3/2? In R it is 0.5. In Python it is 1.
[ Parent
| on HN ]
Re:Is “data scientist” the new “programmer”?
by dekhn on Wednesday September 19, 2018 @07:12PM
(#18028406)
You mean, in Python2, which uses integer division by default, it's 1 (as expected), and in Python3, which uses float division by default, it's 1.5.
If R is giving you 0.5, you should find another language (I assume you meant 1.5?)