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
bf35c961
Commit
bf35c961
authored
Jul 28, 2017
by
j-mark-hou
Committed by
Qiwei Ye
Jul 28, 2017
Browse files
python package: use is_numeric check in is_1d_list in basics.py (#740)
parent
1c92e75d
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 @
bf35c961
...
...
@@ -66,7 +66,7 @@ def is_numpy_1d_array(data):
def
is_1d_list
(
data
):
"""Check is 1d list"""
return
isinstance
(
data
,
list
)
and
\
(
not
data
or
is
instance
(
data
[
0
],
numeric_types
))
(
not
data
or
is
_numeric
(
data
[
0
]
))
def
list_to_1d_numpy
(
data
,
dtype
=
np
.
float32
,
name
=
'list'
):
...
...
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