>([</span><span class="n">x_array</span><span class="p">,</span> <span class="n">y_array</span><span class="p">])</span>
    <span class="n">kde</span> <span class="o">=</span> <span class="n">gaussian_kde</span><span class="p">(</span><span class="n">xy</span><span class="p">)(</span><span class="n">xy</span><span class="p">)</span>

    <span class="c1"># Define the levels for contour as percentiles of the density</span>
    <span class="n">levels</span> <span class="o">=</span> <span class="n">np</span><