n class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
            <span class="c1"># Get neighbors around each sample point in z</span>
            <span class="n">z_array</span> <span class="o">=</span> <span class="n">array</span><span class="p">[</span><span class="n">z_indices</span><span class="p">,</span> <span class="p">:]</span><span class="o">.</span><span class="n">T</span>
            <span class="c1"># Unique combinations of z in the data (z1, z2, z3 ...)</span>
            <