本文整理汇总了Python中utils.tuplize函数的典型用法代码示例。如果您正苦于以下问题:Python tuplize函数的具体用法?Python tuplize怎么用?Python tuplize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tuplize函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: get_phenotype_size
def get_phenotype_size(self):
"""
Return the dimensions required to produce a phenotype.
Cross-layer connections are NxM matrices.
Inter-layer connections are NxN matrices.
Also returns the number of regular neurons that need to be assigned t and gain values.
"""
return {
'cross': [
(sum(self.neuron_count(i)), self.neuron_count(i + 1)[0]) for i in xrange(len(self.layers) - 1)
],
'inter': [
tuplize(self.neuron_count(i)[0]) for i in xrange(1, len(self.layers))
],
'neurons': sum(self.neuron_count(i)[0] for i in xrange(len(self.layers)))
}
开发者ID:paulrinckens,项目名称:IT3708,代码行数:16,代码来源:neural_network.py
示例2: setContributors
def setContributors( self, contributors ):
""" Set Dublin Core Contributor elements - resource collaborators.
"""
# XXX: fixme
self.contributors = tuplize('contributors', contributors, semi_split)
开发者ID:goschtl,项目名称:zope,代码行数:5,代码来源:DublinCore.py
示例3: setSubject
def setSubject( self, subject ):
""" Set Dublin Core Subject element - resource keywords.
"""
self.subject = tuplize( 'subject', subject )
开发者ID:goschtl,项目名称:zope,代码行数:4,代码来源:DublinCore.py
示例4: setCreators
def setCreators(self, creators):
""" Set Dublin Core Creator elements - resource authors.
"""
self.creators = tuplize('creators', creators)
开发者ID:goschtl,项目名称:zope,代码行数:4,代码来源:DublinCore.py
示例5: setContributors
def setContributors( self, contributors ):
"Dublin Core element - additional contributors to resource"
# XXX: fixme
self.contributors = tuplize( 'contributors', contributors )
开发者ID:goschtl,项目名称:zope,代码行数:4,代码来源:DublinCore.py
示例6: setSubject
def setSubject( self, subject ):
"Dublin Core element - resource keywords"
self.subject = tuplize( 'subject', subject )
开发者ID:goschtl,项目名称:zope,代码行数:3,代码来源:DublinCore.py
注:本文中的utils.tuplize函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论