Creating a new numpy array with modified element data type
<p>I had expected the following to create a new numpy array from the shape of an existing array but with modified element data type. My original array is an image with 8bit RGB pixels. I want to create a new array using same shape but with uint16 data type. The purpose is then to convert the image into 16bit pixels and perform some math. To my surprise the following didn't work.</p>

<pre><code>&gt;&gt;&gt; import scipy.misc        as msc
&gt;&gt;&gt; import numpy             as np
&gt;&gt;&gt; img_rgb = msc.imread('Jupiter_20160417_53.png')
&gt;&gt;&gt; img_rgb.dtype
dtype('uint8')
&gt;&gt;&gt; img_rgb.shape
(480, 640, 3)
&gt;&gt;&gt; new= np.zeros(img_rgb.shape,dtype=uint16)
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
NameError: name 'uint16' is not defined
</code></pre>

<p>What did I miss?</p>

<p>Thanks,
Gert</p>