[docs] Bug in Python3 with numpy ('arange' method)
marco at perniciaro.com
marco at perniciaro.com
Tue May 22 05:30:14 EDT 2018
Dear support team,
during a test I found out a possible issue in Python I would like to
report.
Please, confirm if this is a bug or let me know why my expectation are
incorrect:
> python3
Python 3.4.3 (default, Nov 28 2017, 16:41:13)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> x = np.arange(0, 0.5, 0.0001)
>>> 0.4 in x
True
>>> 0.41 in x # expected to be True!
False
>>> 0.42 in x # expected to be True!
False
>>> 0.43 in x
True
>>> 0.429 in x # expected to be True!
False
>>> 0.431 in x
True
Regards,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20180522/e64d6cf2/attachment.html>
More information about the docs
mailing list