While reviewing the code I found these lines in the code that computes the convolved Px model:
# make sure the likelihood params match the iz. First make a deepcopy
if like_params is not None:
like_params = copy.deepcopy(like_params)
for ip, par in enumerate(like_params):
if type(par.value) in [list, np.ndarray] and len(par.value)>1:
like_params[ip].value = par.value[np.array(iz)]
You are doing a deep copy of like_params, and assigning it to like_params?
Looking at the second part, it looks like this is related to having parameters with arrays of values, so maybe this is something that we'd like to get rid of anyway, but I was curious about this use of deepcopy.