Closed yumengch closed 3 years ago
Excellent!
I hope this resolves your concern? The real issue for the model force, I think. is that we always have to manually reset the force if we change it. I think this might be an argument for using an OOP style model...
Yes, pretty much. And yes, OOP is more flexible & robust. But also more daunting for a beginner. I think L63 and L96 should not use OOP.
Related: I will add this TODO: Move documentation from L63 and L96, which is in the form of code comments, into its own doc page (maybe mods/__init__.py
).
d2x_dtdx
, dstep_dx
, and LPs
from mods/L63/__init__.py
into mods/L63/extras.py
?
The pull request relates directly to the issue #20
Key changes:
copy
method to classHiddenMarkovModel
usingcopy.deepcopy
.HMM
import in all examples/tests/mods to assignment with the newcopy
method.--ignore-glob=dapper/mods/Lorenz*
inpyproject.toml
.Response to some comments;
Done
copy
indeed relies onpickling
. However, as far as I can see, current use ofHMM
doesn't run into such problem. If any issues arise in the future, I think we can always use a customised copy. For the time being, I think thecopy
module is sufficient.I'm not so sure about the problem, but I checked that the following short test run uses
F=8.17
.I hope this resolves your concern? The real issue for the model force, I think. is that we always have to manually reset the force if we change it. I think this might be an argument for using an OOP style model...