本文整理匯總了Python中brian2.Synapses.custom_operation方法的典型用法代碼示例。如果您正苦於以下問題:Python Synapses.custom_operation方法的具體用法?Python Synapses.custom_operation怎麽用?Python Synapses.custom_operation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類brian2.Synapses
的用法示例。
在下文中一共展示了Synapses.custom_operation方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_magic_collect
# 需要導入模塊: from brian2 import Synapses [as 別名]
# 或者: from brian2.Synapses 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)))