mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-04 10:10:22 +08:00
Merge pull request #1703 from quantopian/ceil-bugfix
BUG: ceil returns float, int needed for array indexing
This commit is contained in:
@@ -1642,7 +1642,7 @@ def winsorize(row, min_percentile, max_percentile):
|
||||
lowidx = int(min_percentile * num)
|
||||
a[idx[:lowidx]] = a[idx[lowidx]]
|
||||
if max_percentile < 1:
|
||||
upidx = ceil(num * max_percentile)
|
||||
upidx = int(ceil(num * max_percentile))
|
||||
# upidx could return as the length of the array, in this case
|
||||
# no modification to the right tail is necessary.
|
||||
if upidx < num:
|
||||
|
||||
Reference in New Issue
Block a user