an class="n">k_ii</span><span class="p">)</span>
                <span class="n">y_k_ii_sqrt</span> <span class="o">=</span> <span class="n">x_k_ii_sqrt</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="c1"># Calculate self-similarity for X</span>
                <span class="n">x_k_ii</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="n">n_x</span><span class="p">