本文整理汇总了Python中pattern.Pattern.interface[m2_sel_out_gpot]方法的典型用法代码示例。如果您正苦于以下问题:Python Pattern.interface[m2_sel_out_gpot]方法的具体用法?Python Pattern.interface[m2_sel_out_gpot]怎么用?Python Pattern.interface[m2_sel_out_gpot]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pattern.Pattern
的用法示例。
在下文中一共展示了Pattern.interface[m2_sel_out_gpot]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Pattern
# 需要导入模块: from pattern import Pattern [as 别名]
# 或者: from pattern.Pattern import interface[m2_sel_out_gpot] [as 别名]
m2_id = 'm2 '
man.add(MyModule, m2_id, m2_sel, m2_sel_in, m2_sel_out,
m2_sel_gpot, m2_sel_spike,
np.zeros(N2_gpot, dtype=np.double),
np.zeros(N2_spike, dtype=int),
time_sync=True)
# Make sure that all ports in the patterns' interfaces are set so
# that they match those of the modules:
pat12 = Pattern(m1_sel, m2_sel)
pat12.interface[m1_sel_out_gpot] = [0, 'in', 'gpot']
pat12.interface[m1_sel_in_gpot] = [0, 'out', 'gpot']
pat12.interface[m1_sel_out_spike] = [0, 'in', 'spike']
pat12.interface[m1_sel_in_spike] = [0, 'out', 'spike']
pat12.interface[m2_sel_in_gpot] = [1, 'out', 'gpot']
pat12.interface[m2_sel_out_gpot] = [1, 'in', 'gpot']
pat12.interface[m2_sel_in_spike] = [1, 'out', 'spike']
pat12.interface[m2_sel_out_spike] = [1, 'in', 'spike']
pat12['/a/out/gpot[0]', '/b/in/gpot[0]'] = 1
pat12['/a/out/gpot[1]', '/b/in/gpot[1]'] = 1
pat12['/b/out/gpot[0]', '/a/in/gpot[0]'] = 1
pat12['/b/out/gpot[1]', '/a/in/gpot[1]'] = 1
pat12['/a/out/spike[0]', '/b/in/spike[0]'] = 1
pat12['/a/out/spike[1]', '/b/in/spike[1]'] = 1
pat12['/b/out/spike[0]', '/a/in/spike[0]'] = 1
pat12['/b/out/spike[1]', '/a/in/spike[1]'] = 1
check_compatible = True
if check_compatible:
m1_int = Interface.from_selectors(m1_sel, m1_sel_in, m1_sel_out,
m1_sel_spike, m1_sel_gpot, m1_sel)