title: Difference of precision/display between numpy.tolist() and list()
body: <p>This is kind of a follow up to <a href="https://stackoverflow.com/questions/45688226/fix-precision-issues-when-displaying-floats-in-python">coldspeed's question</a>.</p>
  
  <p>(And this is not a duplicate of <a href="https://stackoverflow.com/questions/588004/is-floating-point-math-broken?s=1%7C29.4652">is floating point math broken ?</a> BTW)</p>
  
  <p>I'm converting a list of lists to a numpy array, and then trying to convert it back to a python list of lists.</p>
  
  <pre><code>import numpy as np
  
  x = [[  1.00000000e+00,   6.61560000e-13],
         [  2.00000000e+00,   3.05350000e-13],
         [  3.00000000e+00,   6.22240000e-13],
         [  4.00000000e+00,   3.08850000e-13],
         [  5.00000000e+00,   1.11170000e-10],
         [  6.00000000e+00,   3.82440000e-11],
         [  7.00000000e+00,   5.39160000e-11],
         [  8.00000000e+00,   1.75910000e-11],
         [  9.00000000e+00,   2.27330000e-10]]
  
  x=np.array(x,np.float)
  print([y.tolist() for y in x])
  print([list(y) for y in x])
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>[[1.0, 6.6156e-13], [2.0, 3.0535e-13], [3.0, 6.2224e-13], [4.0, 3.0885e-13], [5.0, 1.1117e-10], [6.0, 3.8244e-11], [7.0, 5.3916e-11], [8.0, 1.7591e-11], [9.0, 2.2733e-10]]
  [[1.0, 6.6155999999999996e-13], [2.0, 3.0535000000000001e-13], [3.0, 6.2223999999999998e-13], [4.0, 3.0884999999999999e-13], [5.0, 1.1117e-10], [6.0, 3.8243999999999997e-11], [7.0, 5.3915999999999998e-11], [8.0, 1.7591e-11], [9.0, 2.2733e-10]]
  </code></pre>
  
  <p>Note that trying to match python native types also fails (same behavior):</p>
  
  <pre><code>x=np.array(x,dtype=float)
  </code></pre>
  
  <p>So converting the lists back to normal python lists using <code>numpy.tolist</code> preserves values, whereas forcing iteration by calling <code>list</code> on them introduces rounding errors.</p>
  
  <p>Fun fact:</p>
  
  <ul>
  <li><code>str([y.tolist() for y in x])==str([list(y) for y in x])</code> yields <code>False</code> (as expected, different printouts)</li>
  <li><code>[y.tolist() for y in x]==[list(y) for y in x]</code> yields <code>True</code> (what the hell??)</li>
  </ul>
  
  <p>Any thoughts? (using python 3.4 64 bits windows)</p>