JorritMontijn / zetapy

Python code implementing the ZETA-test
GNU General Public License v3.0
23 stars 9 forks source link

use numba njit and np.searchsorted to speed up getSpikeT ~ 10x #8

Closed matthewperkins closed 10 months ago

matthewperkins commented 10 months ago

Hi Jorrit and Montjin, made change to getSpikeT to speed up, assumes the vecSpikeTimes is sorted, which unless the experimentalist is totally insane, this should be the case.

Speed up is not as much as I had initially thought ~ 10 x but should get called for each resample, so could add up.

I could not figure how to push the branch with out forking, sorry if this is cumbersome, I am not great at git.

JorritMontijn commented 10 months ago

Thanks. I'll close this pull request and add your code to the dev branch, so I can test it