Skip to content

Commit

Permalink
Merge pull request #4950 from jakevdp/ls-zerodiv-err
Browse files Browse the repository at this point in the history
BUG: fix integer roundoff corner case in Lomb-Scargle
  • Loading branch information
mhvk committed May 20, 2016
2 parents 8818327 + 6a16f34 commit 8d56e05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion astropy/stats/lombscargle/implementations/chi2_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def compute_power(f):
p = np.array([compute_power(f) for f in frequency])

if normalization == 'psd':
p *= 0.5 * t.size / (dy ** -2).sum()
p *= 0.5 * t.size / (dy ** -2.0).sum()
elif normalization == 'model':
p /= (chi2_ref - p)
elif normalization == 'log':
Expand Down

0 comments on commit 8d56e05

Please sign in to comment.