a data-point that experienced an event </span>
choices <span style="color: #666666">=</span> np<span style="color: #666666">.</span>argwhere((E_test<span style="color: #666666">==1.</span>)<span style="color: #666666">&amp;</span>(T_test<span style="color: #666666">&gt;=1</span>))<span style="color: #666666">.</span>flatten()
k <span style="color: #666666">=</span> np<span style="color: #666666">.</span>random<span style="color: #666666">.</span>choice( choices, <span style="color: #666666">1</span>)[<span 