title: Broadcast advanced indexing numpy
body: <p>I have an array of values for example</p>
  
  <pre><code>x = array([[[-0.78867513, -0.21132487,  0.        ,  0.78867513,  0.21132487,    0.        ,  0.        ,  0.        ,  0.        ],
              [ 0.        , -0.78867513, -0.21132487,  0.        ,  0.78867513,    0.21132487,  0.        ,  0.        ,  0.        ],
              [ 0.        ,  0.        ,  0.        , -0.78867513, -0.21132487,    0.        ,  0.78867513,  0.21132487,  0.        ],
              [ 0.        ,  0.        ,  0.        ,  0.        , -0.78867513,   -0.21132487,  0.        ,  0.78867513,  0.21132487]],
             [[-0.78867513, -0.21132487,  0.        ,  0.78867513,  0.21132487,    0.        ,  0.        ,  0.        ,  0.        ],
              [ 0.        , -0.78867513, -0.21132487,  0.        ,  0.78867513,    0.21132487,  0.        ,  0.        ,  0.        ],
              [ 0.        ,  0.        ,  0.        , -0.78867513, -0.21132487,    0.        ,  0.78867513,  0.21132487,  0.        ],
              [ 0.        ,  0.        ,  0.        ,  0.        , -0.78867513,   -0.21132487,  0.        ,  0.78867513,  0.21132487]]])
  </code></pre>
  
  <p>I want in use advanced indexing to pull out the nonzero values.  I know the indices of the nonzero values so</p>
  
  <pre><code>idx = array([[4, 3, 1, 0],
               [5, 4, 2, 1],
               [7, 6, 4, 3],
               [8, 7, 5, 4]])
  </code></pre>
  
  <p>The desired result would be something like</p>
  
  <pre><code>x[idx] = array([[[-0.78867513, -0.21132487,  0.78867513,  0.21132487],
                   [-0.78867513, -0.21132487,  0.78867513,  0.21132487],
                   [-0.78867513, -0.21132487,  0.78867513,  0.21132487],
                   [-0.78867513, -0.21132487,  0.78867513,  0.21132487]],
                  [[-0.78867513, -0.21132487,  0.78867513,  0.21132487],
                   [-0.78867513, -0.21132487,  0.78867513,  0.21132487],
                   [-0.78867513, -0.21132487,  0.78867513,  0.21132487],
                   [-0.78867513, -0.21132487,  0.78867513,  0.21132487]]])
  </code></pre>
  
  <p>The actual <code>x</code> array is much larger along the first dimension, but the nonzero structure is always indicated by <code>idx</code> so I need it to broadcast along the first dimension.  Is this possible?</p>
  
  <p>EDIT: To be clear <code>x</code> along the first dimension contains a nested list of <code>4 x 9</code> array.  <code>idx</code> then has the nonzero entries row-for-row.  Notice in the first row of the both <code>4 x 9</code> nested arrays in <code>x</code> that the <code>4 3 1 0</code> entries are nonzero.</p>