Ticket #78 (closed enhancement: fixed)
monitors.py: Propagate spikes only if spikes exist
| Reported by: | mstimberg | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Core | Version: | 1.3.0 |
| Keywords: | monitors | Cc: |
Description
Some of the monitors (I noticed it for SpikeCounter) process the spikes in every time step with statements like:
self.count[spikes] += 1
This takes considerable time even if the spikes array is empty. I'd therefore suggest to do it as in the Connection classes and put an "if len(spikes):" around such code.
Attached a patch (I also added some tests to increase the test coverage a bit ;) ) -- good enough to commit or do you see any problems?
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

