本文整理汇总了Python中brian2.NeuronGroup.custom_operation方法的典型用法代码示例。如果您正苦于以下问题:Python NeuronGroup.custom_operation方法的具体用法?Python NeuronGroup.custom_operation怎么用?Python NeuronGroup.custom_operation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类brian2.NeuronGroup
的用法示例。
在下文中一共展示了NeuronGroup.custom_operation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_magic_collect
# 需要导入模块: from brian2 import NeuronGroup [as 别名]
# 或者: from brian2.NeuronGroup import custom_operation [as 别名]
def test_magic_collect():
'''
Make sure all expected objects are collected in a magic network
'''
P = PoissonGroup(10, rates=100*Hz)
G = NeuronGroup(10, 'v:1')
S = Synapses(G, G, '')
G_runner = G.custom_operation('')
S_runner = S.custom_operation('')
state_mon = StateMonitor(G, 'v', record=True)
spike_mon = SpikeMonitor(G)
rate_mon = PopulationRateMonitor(G)
objects = collect()
assert len(objects) == 8, ('expected %d objects, got %d' % (8, len(objects)))