mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-29 05:55:11 +08:00
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