diff --git a/stingray/events.py b/stingray/events.py index e94dae625..89bf76081 100644 --- a/stingray/events.py +++ b/stingray/events.py @@ -290,9 +290,9 @@ def from_lc(lc): """ # Multiply times by number of counts - times = [[i] * int(j) for i, j in zip(lc.time, lc.counts)] + times = ([i] * int(j) for i, j in zip(lc.time, lc.counts)) # Concatenate all lists - times = [i for j in times for i in j] + times = list(i for j in times for i in j) return EventList(time=times, gti=lc.gti)