title: KeyError with np.uint32 and numpy.uint32
body: <p>First off the Error I get:</p>
  
  <pre><code>import numpy as np    
  dtype_range = {np.bool_: (False, True),
             np.bool8: (False, True),
             np.uint8: (0, 255),
             np.uint16: (0, 65535),
             np.int8: (-128, 127),
             np.int16: (-32768, 32767),
             np.int64: (-2**63, 2**63 - 1),
             np.uint64: (0, 2**64 - 1),
             np.int32: (-2**31, 2**31 - 1),
             np.uint32: (0, 2**32 - 1),
             np.float32: (-1, 1),
             np.float64: (-1, 1)}
  
  dtype_range[image.dtype.type]
  
  &gt;&gt;&gt;KeyError: &lt;type 'numpy.uint32'&gt;
  </code></pre>
  
  <p>Crazy thing is, when I do</p>
  
  <pre><code>print image.dtype.type
  &gt;&gt;&gt;&lt;type 'numpy.uint32'&gt;
  </code></pre>
  
  <p>Now the main problem is, that this happens in a standard lib of skimage.io, in dtype.py to be exact, and I can not change that source code. So I am wondering how or what can I change in passing my argument <code>image</code> to make it work? My guess would be that there is a problem with the namespace, since it is <code>np</code> and <code>numpy</code>? But how could I influence my data to save it as <code>np.uint32</code> instead of <code>numpy.uint32</code>??</p>
  
  <p>I am using Python 2.7 btw.</p>
  
  <p>Help would be much appreciated.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I casted image to <code>uint8</code> by </p>
  
  <pre><code>image = image.astype(uint8)
  </code></pre>
  
  <p>now this did not throw me an Error, even though </p>
  
  <pre><code>print image.astype(uint8).dtype.type
  &gt;&gt;&gt;&lt;type 'numpy.uint8'&gt;
  </code></pre>
  
  <p>which you would expect, of course.</p>
  
  <p>This resolved my issue. But if anyone knows what happened here, I would be glad for an answer just to understand the problem. Thanks anyways :)</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Well now this is copied from the output of the IPython console:</p>
  
  <pre><code> image = np.array([35, 37, 39, 36, 34, 31, 33, 32, 32, 33, 31, 33, 30, 34, 36, 37, 36,
     32, 33, 30, 28, 30, 28, 28, 29, 30, 29, 31, 30, 31, 36, 33, 34, 31,
     34, 35, 34, 32, 29, 26, 25, 27, 25, 26, 25, 27, 30, 30, 28, 26, 28,
     30, 32, 34, 36, 36, 36, 32, 36, 37, 34, 34, 35, 33, 33, 30, 33, 36,
     36, 36, 33, 33, 39, 38, 34, 32, 32, 29, 28, 29, 30, 32, 32, 28, 30,
     32, 34, 30, 28, 32, 34, 34, 35, 33, 35, 33, 33, 35, 37, 39], dtype=uint32)
  </code></pre>