"""
for codeobj_class in codeobj_classes:
G = NeuronGroup(10, "v:1", codeobj_class=codeobj_class)
mon = StateMonitor(G, "v", record=True,
codeobj_class=codeobj_class)
indices = np.array([3, 2, 1, 1, 4, 5])
times = np.array([6, 5, 4, 3, 3, 1]) * ms
SG = SpikeGeneratorGroup(10, indices, times,
codeobj_class=codeobj_class)
After Change
net = Network(SG, s_mon)
net.run(5*ms)
for idx in xrange(5):
generator_spikes = sorted([(idx, time) for time in times[indices==idx]])
recorded_spikes = sorted([(idx, time) for time in s_mon.t["i==%d" % idx]])
assert generator_spikes == recorded_spikes