本文整理汇总了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)))
}
示例2: setContributors
def setContributors( self, contributors ):
""" Set Dublin Core Contributor elements - resource collaborators.
"""
# XXX: fixme
self.contributors = tuplize('contributors', contributors, semi_split)
示例3: setSubject
def setSubject( self, subject ):
""" Set Dublin Core Subject element - resource keywords.
"""
self.subject = tuplize( 'subject', subject )
示例4: setCreators
def setCreators(self, creators):
""" Set Dublin Core Creator elements - resource authors.
"""
self.creators = tuplize('creators', creators)
示例5: setContributors
def setContributors( self, contributors ):
"Dublin Core element - additional contributors to resource"
# XXX: fixme
self.contributors = tuplize( 'contributors', contributors )
示例6: setSubject
def setSubject( self, subject ):
"Dublin Core element - resource keywords"
self.subject = tuplize( 'subject', subject )