naucse.python.cz icon indicating copy to clipboard operation
naucse.python.cz copied to clipboard

NumPy float arange() example no longer illustrates the problem

Open hroncok opened this issue 4 years ago • 0 comments

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

hroncok avatar Oct 31 '19 15:10 hroncok