Skip to content

Commit

Permalink
Merge pull request #456 from Ameyanagi/master
Browse files Browse the repository at this point in the history
Minor fix to npad argument for smooth function
  • Loading branch information
maurov authored Aug 1, 2023
2 parents 7c648af + ec5aafc commit 8677ab3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion larch/math/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ def smooth(x, y, sigma=1, gamma=None, xstep=None, npad=None, form='lorentzian'):
xstep = min(np.diff(x))
if xstep < TINY:
raise Warning('Cannot smooth data: must be strictly increasing ')
npad = 5
if npad is None:
npad = 5
xmin = xstep * int( (min(x) - npad*xstep)/xstep)
xmax = xstep * int( (max(x) + npad*xstep)/xstep)
npts1 = 1 + int(abs(xmax-xmin+xstep*0.1)/xstep)
Expand Down

0 comments on commit 8677ab3

Please sign in to comment.