Version History
2.1.0
- Bug Fix
Breaking numerical change: Fix missing
gamma(1/n)factor in the Stretched Exponential (SE) closed-form cumulative and EUR.SE._Nfnreturnedqi*tau/n * P(1/n, (t/tau)^n)using the regularised lower incomplete gamma (scipygammainc= P), but the integral ofqi*exp(-(t/tau)^n)isqi*tau/n * gamma(1/n) * P(1/n, (t/tau)^n). Cumulative volume and EUR were wrong by a factor ofgamma(1/n)for anyn != 0.5— understated up to ~64% atn=0.3, exact atn=0.5, overstated ~10% forn > 0.5. Any SE forecast withn != 0.5will now report different cumulative/EUR values. For very smalln,gamma(1/n)overflows (the closed-form EUR genuinely diverges there); SE now falls back to the bounded numerical integrator.
- Performance
Expose
n_gridin the numerical integrator viacum(t, n_grid=...)(and the other volume methods). Default 10,000 is unchanged; a smaller value (e.g. 2,000, ~5e-5 relative error) trades accuracy for a proportional speed-up on the numerically-integrated path (PLE, associated yields).n_grid < 2raisesValueError.
- Other changes
Remove unreachable
pass(and commented-out lines) after araiseinTHM._validate; flagged as unreachable bymypy. No behaviour change.Add
test_SE_cum_matches_integralandtest_PLE_cum_matches_integral, which comparecumagainst adaptive quadrature of the rate — the previouscheck_modelassertions only verified finiteness, so a constant-factor error in a closed-form cumulative passed silently.
2.0.0
- Breaking: Minimum dependency versions raised
Require
numpy >= 2.1(was>= 1.21.1)Require
scipy >= 1.13(was>= 1.7.1)Require
Python >= 3.10(was>= 3.7)ParamDesc.naive_gentype changed fromRandomStatetoGenerator
- Deprecation fixes
Replace
np.bool_withboolin dtype specificationMigrate
numpy.random.RandomStatetonumpy.random.Generator
1.3.0
- Performance
Vectorize
_integrate_withusingcumulative_trapezoidon a log-spaced grid — eliminates per-interval Python loop (~3x faster, comparable accuracy)Vectorize
bourdet()usingsearchsorted— eliminates per-point Python helper calls
- Bug Fix
Fix
bourdet()producingNaNat right-edge points when smoothing window exceeds array boundaryFix
bourdet()incorrect backward-difference at right edge (_get_R_derselected pointiitself, causing division by zero)
- Numerical stability
Replace
np.log(1 + x)withnp.log1p(x)in_qcheckand_Ncheckfor small decline ratesReplace
np.log(1 + D*b)withlog1p(D*b)insecant_from_nominalUse
np.expm1fort^(1-m) - 1in Duong model for precision neart=1
1.2.0
- Build system
Migrate from
setup.py/setup.cfgtopyproject.tomlReplace
flake8withruffVersion now single-sourced in
pyproject.toml, resolved at runtime viaimportlib.metadata
- Bug Fix
Fix overflow in
MultisegmentHyperbolic._Ncheckwhen decline rate is near-zero (subnormal), causingcum(0)to returnNaN
- Other changes
Fix
mypystrict-mode type errors inbourdet.pyandbase.pyUpdate CI and test scripts to use
ruff
1.1.0
- Bug Fix
Fix bug in sign in
MultisegmentHyperbolic.secant_from_nominal
- Other changes
Add mpmath to handle precision requires of THM transient functions (only required to use the functions)
Adjust default degree of THM transient function quadrature integration from 50 to 10 (scipy default is 5)
Update package versions for docs and builds
Address various floating point errors, suppress numpy warnings for those which are mostly unavoidable
Add test/doc_exapmles.py and update figures (not sure what happened to the old file)
Adjust range of values in tests to avoid numerical errors in numpy and scipy functions… these were near-epsilon impractical values anyway
1.0.8
- New functions
Added
WaterPhase.wgrmethod
- Other changes
Adjust yield model rate function to return consistent units if primary phase is oil or gas
Update to numpy v1.20 typing
1.0.7
- Allow disabling of parameter checks by passing an interable of booleans, each indicating a check
to each model parameter.
Explicitly handle floating point overflow errors rather than relying on numpy.
1.0.6
- New functions
Added
WaterPhaseclassAdded
WaterPhase.wormethodAdded
PrimaryPhase.add_watermethod
- Other changes
A
yieldmodel may inherit bothSecondaryPhaseandWaterPhase, with the respective methods removed upon attachment to aPrimaryPhase.
1.0.5
- New functions
Bourdet algorithm
- Other changes
Update docstrings
Add bourdet data derivatives to detailed use examples
1.0.4
Fix typos in docs
1.0.3
Add documentation
Genericize numerical integration
Various refactoring
0.0.1 - 1.0.2
Internal releases