make it compatible with old code

This commit is contained in:
Bing Xu 2014-08-18 02:10:54 -04:00
parent 0d9a8c042c
commit b76853731c

View File

@ -134,7 +134,7 @@ class Booster:
xglib.XGBoosterSetParam(
self.handle, ctypes.c_char_p(k.encode('utf-8')),
ctypes.c_char_p(str(v).encode('utf-8')))
def update(self, dtrain, it):
def update(self, dtrain, it=1):
""" update """
assert isinstance(dtrain, DMatrix)
xglib.XGBoosterUpdateOneIter(self.handle, it, dtrain.handle)