ass="n">distance_ij</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">latmat</span><span class="o">.</span><span class="n">T</span><span class="p">,</span> <span class="n">frac_diff</span><span class="p">)</span>
            <span class="c1"># print(np.linalg.norm(distance_ij,axis=0))</span>
            <span class="k">if</span> <span class="nb">sum</span><span class="p">(</span><span class="n">np</span><span cl