Background Parameters are changed
Bug description / feature request:
Python copies dictionaries only shallowly, so this line in the Particles base class causes the underlying dictionary to be changed when running a delta-f model.
Expected behavior:
Don't change the underlying background dictionary for sampling the particles.
Proposed solution:
The solution is to do a deepcopy (import copy; copy.deepcopy()
, also see this stackoverflow article).