Skip to content

Commit

Permalink
Fix rascal doctest changing formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobachetti committed Jan 11, 2024
1 parent 6104420 commit 12dcb07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions stingray/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1726,12 +1726,10 @@ def truncate(self, start=0, stop=None, method="index"):
>>> ts = StingrayTimeseries(time, array_attrs={"counts": count}, dt=1)
>>> ts_new = ts.truncate(start=2, stop=8)
>>> assert np.allclose(ts_new.counts, [30, 40, 50, 60, 70, 80])
>>> ts_new.time
array([3, 4, 5, 6, 7, 8])
>>> assert np.allclose(ts_new.time, [3, 4, 5, 6, 7, 8])
>>> # Truncation can also be done by time values
>>> ts_new = ts.truncate(start=6, method='time')
>>> ts_new.time
array([6, 7, 8, 9])
>>> assert np.allclose(ts_new.time, [6, 7, 8, 9])
>>> assert np.allclose(ts_new.counts, [60, 70, 80, 90])
"""

Expand Down

0 comments on commit 12dcb07

Please sign in to comment.