Commit b9afdb8f authored by Dr.李's avatar Dr.李

go on ...

parent 29cd24b8
......@@ -12,8 +12,8 @@ import numpy_groupies as npg
def standardize(x: np.ndarray, groups: np.ndarray=None) -> np.ndarray:
if groups is not None:
mean_values = npg.aggregate_np(groups, x, axis=0, func='mean')
std_values = npg.aggregate_np(groups, x, axis=0, func='std', ddof=1)
mean_values = npg.aggregate_nb(groups, x, axis=0, func='mean')
std_values = npg.aggregate_nb(groups, x, axis=0, func='std', ddof=1)
value_index = np.searchsorted(range(len(mean_values)), groups)
......
......@@ -12,8 +12,8 @@ import numpy_groupies as npg
def winsorize_normal(x: np.ndarray, num_stds: int=3, groups: np.ndarray=None) -> np.ndarray:
if groups is not None:
mean_values = npg.aggregate_np(groups, x, axis=0, func='mean')
std_values = npg.aggregate_np(groups, x, axis=0, func='std', ddof=1)
mean_values = npg.aggregate_nb(groups, x, axis=0, func='mean')
std_values = npg.aggregate_nb(groups, x, axis=0, func='std', ddof=1)
value_index = np.searchsorted(range(len(mean_values)), groups)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment