This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: something confused about numpy.arange
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: xyl123
Priority: normal Keywords:

Created on 2018-11-08 12:05 by xyl123, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (1)
msg329466 - (view) Author: xiyunlong (xyl123) Date: 2018-11-08 12:05
when I use:print(np.arange(1,2.2,0.2))
I got: 
1.0
1.2
1.4
1.5999999999999999
1.7999999999999998
1.9999999999999998
2.1999999999999997
could any one tell me why it's not 1.0,1.2,1.4,1.6,1.8,2.0?
Many thanks!
History
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79369
2018-11-08 15:38:43zach.waresetresolution: third party
2018-11-08 12:14:53xyl123setstatus: open -> closed
stage: resolved
2018-11-08 12:05:53xyl123create