Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
f60c14f1
"tests/vscode:/vscode.git/clone" did not exist on "6453a0410dbf6282f91e8fe0346fc72a504d7950"
Unverified
Commit
f60c14f1
authored
Sep 30, 2020
by
Belinda Trotta
Committed by
GitHub
Sep 30, 2020
Browse files
Use ctypes for parameters of DLL functions (#3419)
parent
692c9a5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+4
-4
No files found.
python-package/lightgbm/basic.py
View file @
f60c14f1
...
@@ -2976,9 +2976,9 @@ class Booster(object):
...
@@ -2976,9 +2976,9 @@ class Booster(object):
ptr_string_buffers
=
(
ctypes
.
c_char_p
*
num_feature
)(
*
map
(
ctypes
.
addressof
,
string_buffers
))
ptr_string_buffers
=
(
ctypes
.
c_char_p
*
num_feature
)(
*
map
(
ctypes
.
addressof
,
string_buffers
))
_safe_call
(
_LIB
.
LGBM_BoosterGetFeatureNames
(
_safe_call
(
_LIB
.
LGBM_BoosterGetFeatureNames
(
self
.
handle
,
self
.
handle
,
num_feature
,
ctypes
.
c_int
(
num_feature
)
,
ctypes
.
byref
(
tmp_out_len
),
ctypes
.
byref
(
tmp_out_len
),
reserved_string_buffer_size
,
ctypes
.
c_size_t
(
reserved_string_buffer_size
)
,
ctypes
.
byref
(
required_string_buffer_size
),
ctypes
.
byref
(
required_string_buffer_size
),
ptr_string_buffers
))
ptr_string_buffers
))
if
num_feature
!=
tmp_out_len
.
value
:
if
num_feature
!=
tmp_out_len
.
value
:
...
@@ -3175,9 +3175,9 @@ class Booster(object):
...
@@ -3175,9 +3175,9 @@ class Booster(object):
ptr_string_buffers
=
(
ctypes
.
c_char_p
*
self
.
__num_inner_eval
)(
*
map
(
ctypes
.
addressof
,
string_buffers
))
ptr_string_buffers
=
(
ctypes
.
c_char_p
*
self
.
__num_inner_eval
)(
*
map
(
ctypes
.
addressof
,
string_buffers
))
_safe_call
(
_LIB
.
LGBM_BoosterGetEvalNames
(
_safe_call
(
_LIB
.
LGBM_BoosterGetEvalNames
(
self
.
handle
,
self
.
handle
,
self
.
__num_inner_eval
,
ctypes
.
c_int
(
self
.
__num_inner_eval
)
,
ctypes
.
byref
(
tmp_out_len
),
ctypes
.
byref
(
tmp_out_len
),
reserved_string_buffer_size
,
ctypes
.
c_size_t
(
reserved_string_buffer_size
)
,
ctypes
.
byref
(
required_string_buffer_size
),
ctypes
.
byref
(
required_string_buffer_size
),
ptr_string_buffers
))
ptr_string_buffers
))
if
self
.
__num_inner_eval
!=
tmp_out_len
.
value
:
if
self
.
__num_inner_eval
!=
tmp_out_len
.
value
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment