The purpose of the dummy code below is for task_mech to wait with executing until iti_mech has executed 3 times (simply integrating an input of zero). However, an error message seems to indicate that the previous value of iti_mech is initialized as None which leads to the following error:
File "C:\PsyNeuLink\psyneulink\core\components\functions\nonstateful\objectivefunctions.py", line 1180, in _function
result = np.max(np.fabs(v1 - v2))
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
import psyneulink as pnl
iti_mech = pnl.TransferMechanism(
integrator_mode=True,
integration_rate=1,
termination_threshold=3,
execute_until_finished=False
)
task_mech = pnl.ProcessingMechanism(input_shapes=1)
comp = pnl.Composition()
comp.add_nodes([iti_mech, task_mech])
comp.scheduler.add_condition(
task_mech, pnl.WhenFinished(iti_mech)
)
inputs = {
iti_mech: [0],
task_mech: [1]
}
comp.run(inputs)
The purpose of the dummy code below is for task_mech to wait with executing until iti_mech has executed 3 times (simply integrating an input of zero). However, an error message seems to indicate that the previous value of iti_mech is initialized as None which leads to the following error:
File "C:\PsyNeuLink\psyneulink\core\components\functions\nonstateful\objectivefunctions.py", line 1180, in _function
result = np.max(np.fabs(v1 - v2))
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'