title: Initializing numpy masked array from Python int list with None values
body: <p>As shown in the answer to the question <a href="https://stackoverflow.com/questions/19456239/convert-python-list-with-none-values-to-numpy-array-with-nan-values">Convert python list with None values to numpy array with nan values</a>, it is straightforward to initialize a masked numpy array from a list with None values if we enforce the dtype=float. Those float values get converted to nan and we can simply do:</p>
  
  <pre><code>ma.masked_invalid(np.array(a, dtype=float), copy=False)
  </code></pre>
  
  <p>This however will not work for int like:</p>
  
  <pre><code>ma.masked_invalid(np.array(a, dtype=int), copy=False)
  </code></pre>
  
  <p>since the intermediate np.array will not be created with None values (there is no int nan).</p>
  
  <p>What is the most efficient way to initialize a masked array based on Python list of ints that also contains None values in such way that those None values become masked?</p>