Skip to content

Commit e0f9796

Browse files
mariomario
authored andcommitted
speed up using numba
1 parent 8800910 commit e0f9796

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

code/python/cni_toolbox/gadgets.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828

2929
import numpy as np
3030
import scipy as sc
31+
from numba import jit
3132
from scipy.special import gamma
3233

34+
3335
def two_gamma(timepoints):
3436
'''
3537
Parameters
@@ -49,7 +51,7 @@ def two_gamma(timepoints):
4951
return hrf
5052

5153

52-
54+
@jit
5355
def regress(Y, X, l = 0.):
5456

5557
'''
@@ -100,6 +102,7 @@ def regress(Y, X, l = 0.):
100102

101103
return beta
102104

105+
@jit
103106
def correct_autocorr(X, W):
104107
'''
105108
Parameters

0 commit comments

Comments
 (0)