Skip to content

Commit

Permalink
Merge pull request #543 from chaoming0625/master
Browse files Browse the repository at this point in the history
[dyn] update STDP APIs on CPUs and fix bugs
  • Loading branch information
chaoming0625 committed Nov 11, 2023
2 parents 40c2632 + ebea6b6 commit 92cdc40
Show file tree
Hide file tree
Showing 9 changed files with 373 additions and 245 deletions.
5 changes: 4 additions & 1 deletion brainpy/_src/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ def register_entry(
Return the self.
"""
if entry in self._registered_entries:
raise KeyError(f'Entry {entry} has been registered. You can use another key, or reuse the existing key. ')
raise KeyError(f'Entry {entry} has been registered. '
f'The existing delay for the key {entry} is {self._registered_entries[entry]}. '
f'The new delay for the key {entry} is {delay_time}. '
f'You can use another key. ')

if isinstance(delay_time, (np.ndarray, jax.Array)):
assert delay_time.size == 1 and delay_time.ndim == 0
Expand Down

0 comments on commit 92cdc40

Please sign in to comment.