title: how does numpy.astype(np.uint8) convert a float array? -1.2997805 became 255
body: <p>this is an execution in ipython3</p>
  <pre><code>In [81]: r2
  Out[81]: 
  array([-1.2997805, -1.4251276, -1.3047135, ..., -2.0358603, -1.9741256,
         -1.6412157], dtype=float32)
  
  In [82]: r2.astype(np.uint8)
  Out[82]: array([255, 255, 255, ..., 254, 255, 255], dtype=uint8)
  </code></pre>
  <p>how is -1.2997805 converted to 255?</p>
  <p>ADD : from the comments below(thanks), I tested like this. looks like the float is converted to int, and the modulo 255 (to read it as unsigned int8) is done.</p>
  <pre><code>is first convereted to int. and the it is cut using modulo(%).  
  In [98]: b
  Out[98]: array([-1.,  0.,  1.])
  
  In [99]: b.astype(np.uint8)
  Out[99]: array([255,   0,   1], dtype=uint8)
  </code></pre>