PsyNeuLink icon indicating copy to clipboard operation
PsyNeuLink copied to clipboard

Inconsistent shape of variable and value of Transfer function within TransferWithCosts function

Open jvesely opened this issue 6 years ago • 2 comments

>>> 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.])

jvesely avatar Nov 17 '19 03:11 jvesely

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

kmantel avatar Jan 30 '20 03:01 kmantel

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.

jvesely avatar Jan 30 '20 16:01 jvesely