title: Initialize empty list with same shape as array
body: <p>Say I have an array of the shape:</p>
  
  <pre><code>import numpy as np
  a = np.zeros(shape=(3, 4, 2))
  </code></pre>
  
  <p>which looks like:</p>
  
  <pre><code>print a
  
  [[[ 0.  0.]
    [ 0.  0.]
    [ 0.  0.]
    [ 0.  0.]]
  
   [[ 0.  0.]
    [ 0.  0.]
    [ 0.  0.]
    [ 0.  0.]]
  
   [[ 0.  0.]
    [ 0.  0.]
    [ 0.  0.]
    [ 0.  0.]]]
  </code></pre>
  
  <p>How do I create an empty list with the same shape, where every <code>0.</code> element is replaced by an empty sub-list?</p>
  
  <p>In the specific case shown above, it would look like:</p>
  
  <pre><code>[[[[], []]
    [[], []]
    [[], []]
    [[], []]],
   [[[], []]
    [[], []]
    [[], []]
    [[], []]],
   [[[], []]
    [[], []]
    [[], []]
    [[], []]]]
  </code></pre>
  
  <p>but I need a way that works in general for arrays of any shape. Is there a built in function to do this?</p>