>nnz</span><span class="p">):</span>
            <span class="k">if</span> <span class="n">resid</span><span class="o">.</span><span class="n">norm</span><span class="p">()</span><span class="o">.</span><span class="n">item</span><span class="p">()</span> <span class="o">/</span> <span class="n">normb</span> <span class="o">&lt;</span> <span class="n">tol</span><span class="p">:</span>
                <span class="k">break</span>
            <span class="n">projections</span> <span class="o">=</span> <span 