title: Construct Pandas Panel from 2D structured NumPy array
body: <p>I have a 2D NumPy array of structs:</p>
  
  <pre><code>arr = np.zeros((3,5), [('x',int), ('y',float)])
  </code></pre>
  
  <p>That is:</p>
  
  <pre><code>array([[(0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0)],
         [(0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0)],
         [(0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0)]], 
        dtype=[('x', '&lt;i8'), ('y', '&lt;f8')])
  </code></pre>
  
  <p>I want to create a Pandas Panel from it.  I tried the obvious:</p>
  
  <pre><code>pd.Panel(arr)
  </code></pre>
  
  <blockquote>
    <p>ValueError: The number of dimensions required is 3, but the number of dimensions of the ndarray given was 2</p>
  </blockquote>
  
  <p>Then I discovered this hideous pile:</p>
  
  <pre><code>pd.Panel(dict(enumerate(pd.DataFrame(a) for a in arr)))
  </code></pre>
  
  <p>It produces:</p>
  
  <pre><code>&lt;class 'pandas.core.panel.Panel'&gt;
  Dimensions: 3 (items) x 5 (major_axis) x 2 (minor_axis)
  Items axis: 0 to 2
  Major_axis axis: 0 to 4
  Minor_axis axis: x to y
  </code></pre>
  
  <p>This "works" but is very inefficient and an eyesore.</p>
  
  <p>How are such Panels meant to be constructed?</p>
  
  <p>Edit: I submitted an issue here: <a href="https://github.com/pandas-dev/pandas/issues/14511" rel="nofollow">https://github.com/pandas-dev/pandas/issues/14511</a> </p>