Hi
I have a dict I’m using to substitute in varaiables in a sympy expression. When I need to exstend the dict with an x-value I seem to over write the original dict.
temp_dict = params_dict
print('before: ',params_dict)
temp_dict[x] = mode
print('after: ',params_dict)
I get this
before: {a: np.float64(....), b: np.float64(...), c: np.float64(...)}
after: {a: np.float64(...), b: np.float64(...), c: np.float64(...), x: ...}
What I’m I missing, why is the original dict altered?