"p">:</span>
            <span class="k">if</span> <span class="n">symmetric</span><span class="p">:</span>
                <span class="n">k_ii</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">diagonal</span><span class="p">(</span><span class="n">K_ij</span><span class="p">)</span>
                <span class="n">x_k_ii_sqrt</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><sp