PsyNeuLink
PsyNeuLink copied to clipboard
Inconsistent shape of variable and value of Transfer function within TransferWithCosts function
>>> import psyneulink.core.components.functions.transferfunctions as Functions
>>> f = Functions.TransferWithCosts(default_variable=[1,2,3])
>>> f.defaults.variable
array([1, 2, 3])
>>> f.defaults.value
array([1., 2., 3.])
>>> f.transfer_fct.defaults.variable
array([0])
>>> f.transfer_fct.defaults.value
array([0.])
I've found this is the same problem as in several places, including the other "subfunctions" of TransferWithCosts (intensity_cost_fct, adjustment_cost_fct, etc). Currently we don't have any general way of dealing with parameters that are Functions, but aren't the function. This example could be patched, but I'm not sure if that helps when the other ones exist
I don't think it makes much sense to move a workaround from one place to another. Unless there's a way to consolidate multiple compilation workarounds in one place in pnl, it's probably better to keep this open until a solution is found.