title: Convert python list with None values to numpy array with nan values
body: <p>I am trying to convert a list that contains numeric values and <code>None</code> values to <code>numpy.array</code>, such that <code>None</code> is replaces with <code>numpy.nan</code>.</p>
  
  <p>For example:</p>
  
  <pre><code>my_list = [3,5,6,None,6,None]
  
  # My desired result: 
  my_array = numpy.array([3,5,6,np.nan,6,np.nan]) 
  </code></pre>
  
  <p>Naive approach fails:</p>
  
  <pre><code>&gt;&gt;&gt; my_list
  [3, 5, 6, None, 6, None]
  &gt;&gt;&gt; np.array(my_list)
  array([3, 5, 6, None, 6, None], dtype=object) # very limited 
  &gt;&gt;&gt; _ * 2
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
  
  &gt;&gt;&gt; my_array # normal array can handle these operations
  array([  3.,   5.,   6.,  nan,   6.,  nan])
  &gt;&gt;&gt; my_array * 2
  array([  6.,  10.,  12.,  nan,  12.,  nan])
  </code></pre>
  
  <p>What is the best way to solve this problem?</p>