I just found a weird thing in Python2/3. It seems it's a bug?
I think np.arange(-0.1, 0.2, 0.1) should give [-0.1, 0., 0.1]? Any explanation? Thanks
I just found a weird thing in Python2/3. It seems it's a bug?
I think np.arange(-0.1, 0.2, 0.1) should give [-0.1, 0., 0.1]? Any explanation? Thanks
http://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html
"When using a non-integer step, such as 0.1, the results will often not be consistent. It is better to use linspace for these cases."