n><span class="p">[</span><span class="n">k</span><span class="p">,</span> <span class="nb">int</span><span class="p">(</span><span class="n">tau_max</span><span class="p">):,</span> <span class="p">:]</span> <span class="o">=</span> <span class="n">original_data</span> <span class="o">-</span> <span class="n">predicted</span>
                    <span class="c1"># print(np.abs(residuals[k, int(tau_max):, :]).mean(axis=0))</span>

                <span class="k">if</span> <span class="n">error_flag</span><s