Fix systemic_resample float indexes

indexes should be created as INT array
This commit is contained in:
JIMYL 2015-10-26 22:32:38 +08:00
parent 4f7c896507
commit 8051fa3096

View File

@ -165,7 +165,7 @@ def residual_resample2(w):
def systemic_resample(w):
N = len(w)
Q = np.cumsum(w)
indexes = np.zeros(N)
indexes = np.zeros(N, 'int')
t = np.linspace(0, 1-1/N, N) + random()/N
i, j = 0, 0