Update alias.py

This commit is contained in:
浅梦 2019-05-15 15:04:37 +08:00 committed by GitHub
parent cffc3e8eb3
commit 1be09be85b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ def create_alias_table(area_ratio):
l = len(area_ratio)
accept, alias = [0] * l, [0] * l
small, large = [], []
area_ratio_ = area_ratio * l
area_ratio_ = np.array(area_ratio) * l
for i, prob in enumerate(area_ratio_):
if prob < 1.0:
small.append(i)