Skip to content

Commit

Permalink
Fix rage/ranges call
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobachetti committed Sep 25, 2023
1 parent 6cdb3df commit 2a7ae6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stingray/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def to_timeseries(self, dt, array_attrs=None):
ranges = [ranges[0], ranges[0] + nbins * dt]
times = np.arange(ranges[0] + dt * 0.5, ranges[1], dt)

counts = histogram(self.time, ranges=ranges, bins=nbins)
counts = histogram(self.time, range=ranges, bins=nbins)

attr_dict = dict(counts=counts)

Expand All @@ -293,7 +293,7 @@ def to_timeseries(self, dt, array_attrs=None):
logging.info(f"Creating the {attr} array")

attr_dict[attr] = histogram(
self.time, bins=nbins, weights=getattr(self, attr), ranges=ranges
self.time, bins=nbins, weights=getattr(self, attr), range=ranges
)
meta_attrs = dict((attr, getattr(self, attr)) for attr in self.meta_attrs())
new_ts = StingrayTimeseries(times, array_attrs=attr_dict, **meta_attrs)
Expand Down

0 comments on commit 2a7ae6c

Please sign in to comment.