本文整理汇总了Python中ShareYourSystem.setMatrixArray方法的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem.setMatrixArray方法的具体用法?Python ShareYourSystem.setMatrixArray怎么用?Python ShareYourSystem.setMatrixArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShareYourSystem
的用法示例。
在下文中一共展示了ShareYourSystem.setMatrixArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getSynapticRisePerturbationVariable
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import setMatrixArray [as 别名]
def getSynapticRisePerturbationVariable(self,_PerturbationComplex):
#debug
'''
self.debug(
[
('self.',self,[
'StabilizedDecayTimeVariable',
]),
'_PerturbationComplex is '+str(_PerturbationComplex)
]
)
'''
#return
return SYS.setMatrixArray(
SYS.setMatrixArray(
self.getSynapticDelayPerturbationVariable(_PerturbationComplex),
1.+self.StabilizedDecayTimeVariable*_PerturbationComplex,
np.ndarray.__div__,
_AxisInt=1
),
1.+self.StabilizedRiseTimeVariable*_PerturbationComplex,
np.ndarray.__div__,
_AxisInt=1
)
示例2: getSynapticDelayPerturbationVariable
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import setMatrixArray [as 别名]
def getSynapticDelayPerturbationVariable(self,_PerturbationComplex):
#debug
'''
self.debug(
[
('self.',self,[
'StabilizedDelayTimeVariable'
]),
'_PerturbationComplex is '+str(_PerturbationComplex)
]
)
'''
#return
return SYS.setMatrixArray(
np.ones(
(self.StationarizingUnitsInt,self.StationarizingUnitsInt),
dtype=complex
),
np.exp(
-self.StabilizedDelayTimeVariable*_PerturbationComplex
),
np.ndarray.__mul__,
_AxisInt=1
)
示例3: setStabilizedFlatPerturbationComplexesArray
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import setMatrixArray [as 别名]
def setStabilizedFlatPerturbationComplexesArray(self):
#call
self.setStabilizedTotalPerturbationComplexesArray()
#/###############/#
# multiply all by the LeakNeuralPerturbationVariable
#
#get the numerator leak term
StabilizedLeakNeuralPerturbationVariable=self.getLeakNeuralPerturbationComplex(
self.StabilizedPerturbationComplex
)
#mul
self.StabilizedFlatTotalPerturbationComplexesArray=SYS.setMatrixArray(
self.StabilizedTotalPerturbationComplexesArray.T,
StabilizedLeakNeuralPerturbationVariable,
np.ndarray.__mul__
).T
#debug
'''
示例4: do_numscipy
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import setMatrixArray [as 别名]
#.........这里部分代码省略.........
('We force the ' + self.NumscipyingMeanForceStr + ' to be the same'),
('self.',self,[
'NumscipyingMeanFloat',
'NumscipiedValueFloatsArray'
])
]
)
"""
#Check
if self.NumscipyingMeanForceStr=="rows":
SumAxisInt=1
SetAxisInt=0
elif self.NumscipyingMeanForceStr=="cols":
SumAxisInt=0
SetAxisInt=1
#compute
NumscipiedResiduFloatsArray = np.sum(
self.NumscipiedValueFloatsArray,
axis = SumAxisInt,
) - self.NumscipyingMeanFloat
#debug
"""
self.debug(
[
"NumscipiedResiduFloatsArray is "+str(NumscipiedResiduFloatsArray)
]
)
"""
#set
SYS.setMatrixArray(
self.NumscipiedValueFloatsArray,
- NumscipiedResiduFloatsArray/float(self.NumscipyingColsInt),
_SetMethod=np.ndarray.__add__,
_AxisInt=SetAxisInt
)
#/#################/#
# Compute statistic
#
#debug
'''
self.debug(
[
'Do we compute statistics on the matrix ?',
('self.',self,[
'NumscipyingStatBool',
'NumscipyingRowsInt',
'NumscipyingColsInt'
]),
'self.NumscipyingRowsInt==self.NumscipyingColsInt is '+str(
self.NumscipyingRowsInt==self.NumscipyingColsInt
)
]
)
'''
#Check
if self.NumscipyingStatBool and self.NumscipyingRowsInt==self.NumscipyingColsInt:
#import
import itertools
示例5: setStabilizedTotalPerturbationComplexesArray
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import setMatrixArray [as 别名]
def setStabilizedTotalPerturbationComplexesArray(self):
#/###############/#
# Prepare the complex pulsation perturbation
# init StabilizedTotalPerturbationComplexesArray
#alias
PerturbationComplex = self.StabilizedPerturbationComplex
#copy
self.StabilizedTotalPerturbationComplexesArray =- np.array(
self.StabilizedPerturbationWeightFloatsArray[:],
dtype=complex
)
#/###############/#
# Synaptic coupling
#
#exp
#self.StabilizedSynapticPerturbationVariable=self.getSynapticPerturbationVariable(
# PerturbationComplex
# )
#debug
#self.debug(
# [
# ('self.',self,[
# 'StabilizedSynapticPerturbationVariable',
# 'getSynapticPerturbationVariable',
# 'StabilizedSynapticPerturbationMethodVariable'
# ])
# ]
#)
#Check
if self.StabilizedSynapticPerturbationMethodVariable!=None:
#set
self.StabilizedSynapticPerturbationComplexesArray=self.StabilizedSynapticPerturbationMethodVariable(
PerturbationComplex
)
#debug
'''
self.debug(
[
"Just before the synaptic set",
('self.',self,[
'StabilizedPerturbationComplex',
'StabilizedTotalPerturbationComplexesArray',
'StabilizedSynapticPerturbationMethodVariable'
])
]
)
'''
#mul
SYS.setMatrixArray(
self.StabilizedTotalPerturbationComplexesArray,
self.StabilizedSynapticPerturbationComplexesArray,
np.ndarray.__mul__
)
#debug
'''
self.debug(
[
"Just after the synaptic set",
('self.',self,[
'StabilizedPerturbationComplex',
'StabilizedTotalPerturbationComplexesArray',
'StabilizedSynapticPerturbationComplexesArray'
])
]
)
'''
#debug
'''
self.debug(
[
'Ok we have mul the synaptic coupling',
('self.',self,[
'StabilizedTotalPerturbationComplexesArray'
])
]
)
'''
#/###############/#
# Neural response coupling
#
#exp
self.StabilizedNeuralPerturbationComplexesArray=self.StabilizedNeuralPerturbationMethodVariable(
PerturbationComplex
)
#debug
#.........这里部分代码省略.........
示例6: stabilizeNetwork
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import setMatrixArray [as 别名]
def stabilizeNetwork(self):
#/###################/#
# Determine the time constant structures
#
#set
if type(self.StabilizingConstantTimeVariable)==None.__class__:
self.StabilizingConstantTimeVariable=map(
lambda __DeriveStabilizer:
__DeriveStabilizer.LifingConstantTimeFloat,
self.TeamDict['Populations'].ManagementDict.values()
)
#debug
'''
self.debug(
[
('self.',self,[
'StabilizingConstantTimeVariable'
])
]
)
'''
#map
map(
lambda __TimeStr:
SYS.setInitArray(
self,
'Stabilize',
__TimeStr+'Time'
),
[
'Constant',
'Delay',
'Decay',
'Rise'
]
)
#/###################/#
# Build the always fixed terms of the perturbation matrix
#
#debug
'''
self.debug(
[
'We init the computations the StabilizedPerturbationWeightFloatsArray',
('self.',self,[
'StationarizingConstantTimeVariable',
'StationarizedMeanWeightFloatsArray',
'StabilizedConstantTimeVariable'
])
]
)
'''
#set
self.StabilizedPerturbationWeightFloatsArray=self.StationarizedMeanWeightFloatsArray[
:
]
#mul
SYS.setMatrixArray(
self.StabilizedPerturbationWeightFloatsArray,
self.StabilizedConstantTimeVariable,
np.ndarray.__mul__
)
#debug
'''
self.debug(
[
'In the end',
('self.',self,[
'StabilizedPerturbationWeightFloatsArray'
])
]
)
'''
#/###################/#
# Determine which function to get for the synaptic computation
#
#debug
'''
self.debug(
[
"We determine the type of Synaptic function",
('self.',self,[
'StabilizedRiseTimeVariable',
'StabilizedDecayTimeVariable',
'StabilizedDelayTimeVariable'
])
]
)
#.........这里部分代码省略.........