Skip to content

Commit

Permalink
Merge pull request #10 from PKU-NIP-Lab/develop
Browse files Browse the repository at this point in the history
Support dynamics analysis
  • Loading branch information
chaoming0625 committed Nov 11, 2020
2 parents a9f1304 + a1ed513 commit eff27b1
Show file tree
Hide file tree
Showing 22 changed files with 1,176 additions and 116 deletions.
6 changes: 3 additions & 3 deletions brainpy/core_system/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,12 +882,12 @@ def __step_mode_nb_scalar(self):
code_arg2call[f'{self._name}_pre2syn'] = f'{self._name}.pre2syn'
code_args.add(f'{self._name}_pre_indices')
code_arg2call[f'{self._name}_pre_indices'] = f'{self._name}.pre_group.indices'
# # f'for _pre_i_ in numba.prange({self.ensemble.pre_group.num}):',
# f'for _pre_i_ in numba.prange({self.ensemble.pre_group.num}):',
code_lines = [f'{self._name}_pre_indices = {self._name}_pre_indices.flatten()',
f'for _pre_i_ in numba.prange({self.ensemble.pre_group.num}):',
f' _pre_i_ = {self._name}_pre_indices[_pre_i_]',
f' for _syn_i_ in {self._name}_pre2syn[_pre_i_]:',
f' _obj_i_ = {self._name}_post_idx[_syn_i_]']
f' for _obj_i_ in {self._name}_pre2syn[_pre_i_]:',
f' _post_i_ = {self._name}_post_idx[_obj_i_]']
blank = ' ' * 2
elif has_pre:
code_args.add(f'{self._name}_pre2syn')
Expand Down
2 changes: 2 additions & 0 deletions brainpy/dynamics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

AUTONOMOUS_SYSTEM = 'autonomous_system'
NON_AUTONOMOUS_SYSTEM = 'non_autonomous_system'

from .analyzer import *
72 changes: 0 additions & 72 deletions brainpy/dynamics/analyst.py

This file was deleted.

0 comments on commit eff27b1

Please sign in to comment.