First time here? Check out the FAQ!
answered 2012-06-27 22:47:12 +0100
This is a problem with floating point arithmetic. Even numpy doesn't do things exactly; it's only a question of magnitude of error. To get it exactly, use exact numbers: srange(0,2,1/1000).
srange(0,2,1/1000)