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
77132aa7
Unverified
Commit
77132aa7
authored
Feb 26, 2023
by
James Lamb
Committed by
GitHub
Feb 26, 2023
Browse files
[python-package] fix mypy error about ctypes array creation (#5726)
parent
39ed8ea2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+1
-1
No files found.
python-package/lightgbm/basic.py
View file @
77132aa7
...
...
@@ -314,7 +314,7 @@ def _c_str(string: str) -> ctypes.c_char_p:
def
_c_array
(
ctype
:
type
,
values
:
List
[
Any
])
->
ctypes
.
Array
:
"""Convert a Python array to C array."""
return
(
ctype
*
len
(
values
))(
*
values
)
return
(
ctype
*
len
(
values
))(
*
values
)
# type: ignore[operator]
def
_json_default_with_numpy
(
obj
:
Any
)
->
Any
:
...
...
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