Skip to content
Snippets Groups Projects
  • Erin (Josh) Rigler's avatar
    37e9aa10
    Better default l0 in additive() method, etc. · 37e9aa10
    Erin (Josh) Rigler authored
    Previously, if l0 was None, we tried to calculate a default initial level. This was
    problematic if yobs had no valid points from which to calculate a mean. Now, if yobs
    has no valid points, default to l0=0. This is a bit arbitrary, but it is necessary
    to prevent a NaN-valued l from being passed back out. Other defaults are equally
    arbitrary.
    
    Also, I noticed that the `s` variable was getting converted from a NumPy array to a
    list just before the method returned. For consistency with other outputs, we no
    longer convert, and just return a NumPy array.
    37e9aa10
    History
    Better default l0 in additive() method, etc.
    Erin (Josh) Rigler authored
    Previously, if l0 was None, we tried to calculate a default initial level. This was
    problematic if yobs had no valid points from which to calculate a mean. Now, if yobs
    has no valid points, default to l0=0. This is a bit arbitrary, but it is necessary
    to prevent a NaN-valued l from being passed back out. Other defaults are equally
    arbitrary.
    
    Also, I noticed that the `s` variable was getting converted from a NumPy array to a
    list just before the method returned. For consistency with other outputs, we no
    longer convert, and just return a NumPy array.