Type fix for WebAssembly: use bst_ulong instead of size_t for ncol in CSR conversion. (#8369)
This commit is contained in:
parent
a2593e60bf
commit
5699f60a88
@ -2307,7 +2307,7 @@ class Booster:
|
||||
_array_interface(csr.indptr),
|
||||
_array_interface(csr.indices),
|
||||
_array_interface(csr.data),
|
||||
ctypes.c_size_t(csr.shape[1]),
|
||||
c_bst_ulong(csr.shape[1]),
|
||||
from_pystr_to_cstr(json.dumps(args)),
|
||||
p_handle,
|
||||
ctypes.byref(shape),
|
||||
|
||||
@ -103,7 +103,7 @@ def _from_scipy_csr(
|
||||
_array_interface(data.indptr),
|
||||
_array_interface(data.indices),
|
||||
_array_interface(data.data),
|
||||
ctypes.c_size_t(data.shape[1]),
|
||||
c_bst_ulong(data.shape[1]),
|
||||
config,
|
||||
ctypes.byref(handle),
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user