Executing the following code in a fresh Python 2.7.3 interpreter on my ubuntu linux machine gives the output shown after the code.
import numpy as np
p = [1/3., 1/2., 23/25., 1]
q = np.array(p)
r = list(q)
print p; print q; print r
Output:
[0.3333333333333333, 0.5, 0.92, 1]
[ 0.33333333 0.5 0.92 1. ]
[0.33333333333333331, 0.5, 0.92000000000000004, 1.0]
I'm trying to figure out why p and r print out differently, but so far haven't got a plausible theory. Any ideas on why they differ?