><span class="n">k</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

                    <span class="c1"># Select sample according to gamma_opt, is a bool vector</span>
                    <span class="n">selected_samples_k</span> <span class="o">=</span> <span class="p">(</span><span class="n">gamma_temp</span><span class="p">[</span><span class="n">k</span><span class="p">,</span> <span class="p">:]</span> <span class="o">&gt;</span> <span class="n">switch_thres</span