Open tlestang opened 4 years ago
Merging #20 into dev will decrease coverage by
0.27%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## dev #20 +/- ##
==========================================
- Coverage 77.84% 77.56% -0.28%
==========================================
Files 14 14
Lines 1124 1110 -14
==========================================
- Hits 875 861 -14
Misses 249 249
Impacted Files | Coverage Δ | |
---|---|---|
stochrare/dynamics/diffusion.py | 85.40% <100.00%> (-0.39%) |
:arrow_down: |
stochrare/utils.py | 100.00% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 67e97d9...244af0f. Read the comment docs.
Edit 01/07/2020 This PR grew larger than just extending
DiffusionProcess.update
. It ports all methods from the specialised 1d classDiffusionProcess1D
to the general classDiffusionProcess
, using the@method1d
decorator to restrict some of them to process in 1DAt the moment it is assumed that if
DiffusionProcess.update
is called from a process withdimension=1
, then the state vector is an array of size 1. This adds a conditial inDiffusionProcess.update
to make update return afloat
for `1d processes.I chose not the check the dimesion with something like
Reasons:
update
is intended to be mostly called internally, it's not requiredupdate
is called repeatedlyxn
isfloat
thenlen(xn)
does not exist, so must first use extranp.atleast1d
which adds complexity.