Skip to content

Commit

Permalink
Merge pull request #109 from leigh2/patch-1
Browse files Browse the repository at this point in the history
Update helpers.py
  • Loading branch information
hippke authored Jan 6, 2024
2 parents 4ef0f14 + 2291688 commit 7b8c4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transitleastsquares/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def running_mean_equal_length(data, width_signal):
def running_median(data, kernel):
"""Returns sliding median of width 'kernel' and same length as data """
idx = numpy.arange(kernel) + numpy.arange(len(data) - kernel + 1)[:, None]
idx = idx.astype(numpy.int) # needed if oversampling_factor is not int
idx = idx.astype(numpy.int64) # needed if oversampling_factor is not int
med = numpy.median(data[idx], axis=1)

# Append the first/last value at the beginning/end to match the length of
Expand Down

0 comments on commit 7b8c4f0

Please sign in to comment.