fix VisibleDeprecationWarning

This commit is contained in:
Shayne Kang
2016-05-08 01:44:04 +09:00
parent 840481d215
commit bf24d6ae98
2 changed files with 3 additions and 2 deletions

View File

@@ -269,7 +269,7 @@ def mknfold(dall, nfold, param, seed, evals=(), fpreproc=None, stratified=False,
if stratified is False and folds is None:
randidx = np.random.permutation(dall.num_row())
kstep = len(randidx) / nfold
kstep = int(len(randidx) / nfold)
idset = [randidx[(i * kstep): min(len(randidx), (i + 1) * kstep)] for i in range(nfold)]
elif folds is not None:
idset = [x[1] for x in folds]