[issue35187] a bug about np.arrange

2018-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: It's also worth taking a look at the documentation: https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.arange.html See particularly the "Result" section, where it says: > Because of floating point overflow, this rule may result in the last >

[issue35187] a bug about np.arrange

2018-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: np.arange is part of NumPy, not core Python; I'd suggest asking this question on the NumPy mailing lists, e.g. https://mail.python.org/pipermail/numpy-discussion/ But no, it's not a bug; it's a well-known gotcha. -- nosy: +mark.dickinson

[issue35187] a bug about np.arrange

2018-11-07 Thread xiyunlong
New submission from xiyunlong : when I use np.arange as follows: np.arange(1,2.2,0.2) I got the array as [1. , 1.2, 1.4, 1.6, 1.8, 2. , 2.2],we know, the maxvalue 2.2 of the array should not be included in the array. Is this a bug? -- components: Library (Lib) messages: 329460 nosy: