naucse.python.cz
naucse.python.cz copied to clipboard
NumPy float arange() example no longer illustrates the problem
Our example is:
>>> numpy.arange(0.0, 50.0, 0.3)[-1]
49.799999999999997
But this gives the following with current Python and NumPy:
>>> numpy.arange(0.0, 50.0, 0.3)[-1]
49.8