First time here? Check out the FAQ!
answered 12 years ago
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)