"ow">not</span> <span class="n">np</span><span class="o">.</span><span class="n">any</span><span class="p">(</span><span class="n">D</span><span class="o">.</span><span class="n">array</span> <span class="o">==</span> <span class="o">-</span><span class="mi">1</span><span class="p">):</span>
                <span class="k">break</span>
        
        <span class="c1"># If there are still -1&#39;s, set them to np.inf</span>
        <span class="k">if</span> <span class="n">np</span><span class="o">.</span>