bmtk
bmtk copied to clipboard
Optimize fitfuns.py
The following changes are made in bmtk/simulator/filternet/lgnmodel/fitfuns.py to significantly speed up network preparation:
- Optimize function
ff()to use vectorized computation instead of looping over an NumPy array. - Replace the use of
np.tilein functionnormalizecols()andmakeBasis_StimKernel()by automatic broadcasting in NumPy. - In function
makeBasis_StimKernel(), compute variablekbasis0in a single step instead of using a for-loop in original code.