Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize fitfuns.py #338

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

CloudyDory
Copy link

@CloudyDory CloudyDory commented Nov 2, 2023

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.tile in function normalizecols() and makeBasis_StimKernel() by automatic broadcasting in NumPy.
  • In function makeBasis_StimKernel(), compute variable kbasis0 in a single step instead of using a for-loop in original code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant