Co-authored-by: Yizhi Liu <liuyizhi@apache.org>
This commit is contained in:
parent
3f92970a39
commit
e43cd60c0e
@ -2308,7 +2308,7 @@ class Booster:
|
|||||||
_array_interface(csr.indptr),
|
_array_interface(csr.indptr),
|
||||||
_array_interface(csr.indices),
|
_array_interface(csr.indices),
|
||||||
_array_interface(csr.data),
|
_array_interface(csr.data),
|
||||||
ctypes.c_size_t(csr.shape[1]),
|
c_bst_ulong(csr.shape[1]),
|
||||||
from_pystr_to_cstr(json.dumps(args)),
|
from_pystr_to_cstr(json.dumps(args)),
|
||||||
p_handle,
|
p_handle,
|
||||||
ctypes.byref(shape),
|
ctypes.byref(shape),
|
||||||
|
|||||||
@ -103,7 +103,7 @@ def _from_scipy_csr(
|
|||||||
_array_interface(data.indptr),
|
_array_interface(data.indptr),
|
||||||
_array_interface(data.indices),
|
_array_interface(data.indices),
|
||||||
_array_interface(data.data),
|
_array_interface(data.data),
|
||||||
ctypes.c_size_t(data.shape[1]),
|
c_bst_ulong(data.shape[1]),
|
||||||
config,
|
config,
|
||||||
ctypes.byref(handle),
|
ctypes.byref(handle),
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user