Skip to content
Snippets Groups Projects
Commit 05a81d1c authored by Jeremy M Fee's avatar Jeremy M Fee Committed by GitHub
Browse files

Merge pull request #144 from erigler-usgs/SqDistAlgorithm_default_l0_etc

Better default l0 in additive() method, etc.
parents 4bcdafad ffbe40ce
No related branches found
No related tags found
No related merge requests found
......@@ -328,6 +328,8 @@ class SqDistAlgorithm(Algorithm):
# set some default values
if l0 is None:
l = np.nanmean(yobs[0:int(m)])
if l is np.nan:
l = 0.
else:
l = l0
if not np.isscalar(l0):
......@@ -487,7 +489,7 @@ class SqDistAlgorithm(Algorithm):
r = np.cumsum(r)
l = l + r[-1]
s = list(np.array(s) - np.hstack((r, np.tile(r[-1], m - 1))))
s = np.array(s) - np.hstack((r, np.tile(r[-1], m - 1)))
return (yhat[:len(yobs) + fc],
s[:len(yobs) + fc],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment