本文整理汇总了Python中brian2.groups.neurongroup.NeuronGroup.z方法的典型用法代码示例。如果您正苦于以下问题:Python NeuronGroup.z方法的具体用法?Python NeuronGroup.z怎么用?Python NeuronGroup.z使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类brian2.groups.neurongroup.NeuronGroup
的用法示例。
在下文中一共展示了NeuronGroup.z方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_linked_double_linked3
# 需要导入模块: from brian2.groups.neurongroup import NeuronGroup [as 别名]
# 或者: from brian2.groups.neurongroup.NeuronGroup import z [as 别名]
def test_linked_double_linked3():
'''
Linked to a linked variable, first with indices, second without indices
'''
G1 = NeuronGroup(5, 'x : 1')
G2 = NeuronGroup(10, 'y : 1 (linked)')
G2.y = linked_var(G1.x, index=np.arange(5).repeat(2))
G3 = NeuronGroup(10, 'z: 1 (linked)')
G3.z = linked_var(G2.y)
G1.x = np.arange(5)*0.1
assert_equal(G3.z[:], np.arange(5).repeat(2)*0.1)
示例2: test_linked_double_linked4
# 需要导入模块: from brian2.groups.neurongroup import NeuronGroup [as 别名]
# 或者: from brian2.groups.neurongroup.NeuronGroup import z [as 别名]
def test_linked_double_linked4():
'''
Linked to a linked variable, both use indices
'''
G1 = NeuronGroup(5, 'x : 1')
G2 = NeuronGroup(10, 'y : 1 (linked)')
G2.y = linked_var(G1.x, index=np.arange(5).repeat(2))
G3 = NeuronGroup(10, 'z: 1 (linked)')
G3.z = linked_var(G2.y, index=np.arange(10)[::-1])
G1.x = np.arange(5)*0.1
assert_equal(G3.z[:], np.arange(5).repeat(2)[::-1]*0.1)
示例3: test_linked_double_linked1
# 需要导入模块: from brian2.groups.neurongroup import NeuronGroup [as 别名]
# 或者: from brian2.groups.neurongroup.NeuronGroup import z [as 别名]
def test_linked_double_linked1():
'''
Linked to a linked variable, without indices
'''
G1 = NeuronGroup(10, 'x : 1')
G2 = NeuronGroup(10, 'y : 1 (linked)')
G2.y = linked_var(G1.x)
G3 = NeuronGroup(10, 'z: 1 (linked)')
G3.z = linked_var(G2.y)
G1.x = np.arange(10)
assert_equal(G3.z[:], np.arange(10))