diff --git a/ge/alias.py b/ge/alias.py index a1eb094..b8a7592 100644 --- a/ge/alias.py +++ b/ge/alias.py @@ -10,9 +10,8 @@ def create_alias_table(area_ratio): l = len(area_ratio) accept, alias = [0] * l, [0] * l small, large = [], [] - area_ratio_ = np.array(area_ratio) * l - for i, prob in enumerate(area_ratio_): - if prob < 1.0: + for i, prob in enumerate(area_ratio): + if prob*l < 1.0: small.append(i) else: large.append(i)