当前位置: 首页>>代码示例>>Python>>正文


Python Context.copy_node方法代码示例

本文整理汇总了Python中context.Context.copy_node方法的典型用法代码示例。如果您正苦于以下问题:Python Context.copy_node方法的具体用法?Python Context.copy_node怎么用?Python Context.copy_node使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在context.Context的用法示例。


在下文中一共展示了Context.copy_node方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1:

# 需要导入模块: from context import Context [as 别名]
# 或者: from context.Context import copy_node [as 别名]
           '$x, $y = $stim_grid.get_next()',
           '$init_data($output_length)')
s.add_rule('interact',
           '$temp_data = $stim_data[$x][$y]')
s.add_rule('update',
           #'print "TEMP_DATA: ", $temp_data',
           '$append_data($temp_data)',
           '$clean_data($output_length)')
"""


# make some stim_point copies...should technically make lots more than 10...
#s.set_focus('parent')
# TODO: want to change copy_node so that it takes constraints? 
#s.copy_node(N=99) # for dx,dy = 2,2
s.copy_node(N=399)
#raw_input()



# now add grid of biphasics for every input
s.set_focus('parent')
# note that this is in the "stimulus" layer...
s.add_node('$name = "biphasic"')
s.set_focus('$name == "biphasic"')

# make biphasic read from associated stim_point
s.add_rule('init', 
           '$x, $y = $bph_grid.get_next()',
           '$init_data($output_length)')
# Add a biphasic irf...unity amplitude for now
开发者ID:abjose,项目名称:surfsim2,代码行数:33,代码来源:tests.py

示例2: BCMs

# 需要导入模块: from context import Context [as 别名]
# 或者: from context.Context import copy_node [as 别名]
# make stim_point read from its associated position in parent's stimulus matrix
s.add_rule('init', 
           '$x, $y = $child_grid.get_next()',
           '$init_data($output_length)')
s.add_rule('interact',
           '$temp_data = $stim_data[$x][$y]')
s.add_rule('update',
           #'print "TEMP_DATA: ", $temp_data',
           '$append_data($temp_data)',
           #'print $data',
           '$clean_data($output_length)')

# make some stim_point copies...should technically make lots more than 10...
#s.set_focus('parent')
# TODO: want to change copy_node so that it takes constraints? 
s.copy_node(N=99)



# Add another node to root to act as the Ganglion Cell Module
s.set_focus('parent')
s.set_focus('parent')
s.add_node('$name = "GCM"')
s.set_focus('$name == "GCM"')

# Add a grid-positioning rule for BCMs (grid same size as stimulus)
s.add_rule('init',
           '$child_grid = Grid(x0=5, y0=5, dx=5, dy=5, xl=$stim_size, yl=$stim_size)')
           

开发者ID:abjose,项目名称:surfsim3,代码行数:30,代码来源:old_tests.py


注:本文中的context.Context.copy_node方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。