Skip to content

Commit e43cd60

Browse files
trivialfisyzhliu
andauthored
[backport] Type fix for WebAssembly. (dmlc#8369) (dmlc#8394)
Co-authored-by: Yizhi Liu <[email protected]>
1 parent 3f92970 commit e43cd60

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python-package/xgboost/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,7 @@ def inplace_predict(
23082308
_array_interface(csr.indptr),
23092309
_array_interface(csr.indices),
23102310
_array_interface(csr.data),
2311-
ctypes.c_size_t(csr.shape[1]),
2311+
c_bst_ulong(csr.shape[1]),
23122312
from_pystr_to_cstr(json.dumps(args)),
23132313
p_handle,
23142314
ctypes.byref(shape),

python-package/xgboost/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _from_scipy_csr(
103103
_array_interface(data.indptr),
104104
_array_interface(data.indices),
105105
_array_interface(data.data),
106-
ctypes.c_size_t(data.shape[1]),
106+
c_bst_ulong(data.shape[1]),
107107
config,
108108
ctypes.byref(handle),
109109
)

0 commit comments

Comments
 (0)