Skip to content

Commit

Permalink
make quantile private
Browse files Browse the repository at this point in the history
  • Loading branch information
whitews committed Oct 9, 2020
1 parent 6bb84d3 commit d1c8fa8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flowutils/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from . import logicle_c


def quantile(x, n):
"""return the lower nth quantile"""
def _quantile(x, n):
"""return the lower nth _quantile"""
try:
return sorted(x)[int(n * len(x))]
except IndexError:
Expand Down Expand Up @@ -61,7 +61,7 @@ def logicle(
if r_quant:
w = None
tmp = data_copy[:, i]
r = quantile(tmp[tmp < 0], 0.05)
r = _quantile(tmp[tmp < 0], 0.05)
if r is None and w is None:
w = 0.5
tmp = _logicle(data_copy[:, i].T, t, m, r, w, a)
Expand All @@ -88,7 +88,7 @@ def logicle_inverse(
if r_quant:
w = None
tmp = data_copy[:, i]
r = quantile(tmp[tmp < 0], 0.05)
r = _quantile(tmp[tmp < 0], 0.05)
if r is None and w is None:
w = 0.5
tmp = _logicle_inverse(data_copy[:, i].T, t, m, r, w, a)
Expand Down

0 comments on commit d1c8fa8

Please sign in to comment.