n class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">min</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">abs</span><span class="p">(</span><span class="n">i</span> <span class="o">-</span> <span class="n">mm</span><span class="p">[</span><span class="ow">not</span> <span class="p">(</span><span class="n">id_key</span><span class="p">)]))</span>

    <span class="k">if</span> <span class="n">disttype</span> <span class="o">==</sp