Skip to content

Commit

Permalink
fix for python 3.11 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pupperemeritus authored and matteobachetti committed Sep 26, 2023
1 parent 53521ff commit c55c0d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stingray/tests/test_lombscargle.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,8 @@ def test_make_empty_powerspectrum(self):
assert ps.method is None

def test_ps_real(self):
ps = LombScarglePowerspectrum(self.lc)
assert np.allclose(ps.power.imag, [0], atol=1e-4)
counts = np.random.poisson(10, 1000)
times = np.arange(0, 1000, 1)
lc = Lightcurve(times, counts, dt=1)
ps = LombScarglePowerspectrum(lc)
assert np.allclose(ps.power.imag, np.zeros_like(ps.power.imag), atol=1e-4)

0 comments on commit c55c0d6

Please sign in to comment.