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
aabbb979
"tests/git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "a4a0235d17bc8295cc1ab3ce35b5f68000ad2fd9"
Unverified
Commit
aabbb979
authored
Nov 27, 2020
by
Michael Frasco
Committed by
GitHub
Nov 27, 2020
Browse files
use keyword arguments for internal functions in utils.R (#3604)
parent
0a9bd662
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
R-package/R/utils.R
R-package/R/utils.R
+6
-6
No files found.
R-package/R/utils.R
View file @
aabbb979
lgb.is.Booster
<-
function
(
x
)
{
lgb.check.r6.class
(
x
,
"lgb.Booster"
)
lgb.check.r6.class
(
object
=
x
,
name
=
"lgb.Booster"
)
}
lgb.is.Dataset
<-
function
(
x
)
{
lgb.check.r6.class
(
x
,
"lgb.Dataset"
)
lgb.check.r6.class
(
object
=
x
,
name
=
"lgb.Dataset"
)
}
lgb.null.handle
<-
function
()
{
...
...
@@ -53,7 +53,7 @@ lgb.last_error <- function() {
)
}
stop
(
"api error: "
,
lgb.encode.char
(
err_msg
,
act_len
))
stop
(
"api error: "
,
lgb.encode.char
(
arr
=
err_msg
,
len
=
act_len
))
}
lgb.call
<-
function
(
fun_name
,
ret
,
...
)
{
...
...
@@ -104,7 +104,7 @@ lgb.call.return.str <- function(fun_name, ...) {
buf
<-
lgb.call
(
fun_name
,
ret
=
buf
,
...
,
buf_len
,
act_len
)
}
return
(
lgb.encode.char
(
buf
,
act_len
))
return
(
lgb.encode.char
(
arr
=
buf
,
len
=
act_len
))
}
...
...
@@ -163,10 +163,10 @@ lgb.params2str <- function(params, ...) {
# Check ret length
if
(
length
(
ret
)
==
0L
)
{
return
(
lgb.c_str
(
""
))
return
(
lgb.c_str
(
x
=
""
))
}
return
(
lgb.c_str
(
paste0
(
ret
,
collapse
=
" "
)))
return
(
lgb.c_str
(
x
=
paste0
(
ret
,
collapse
=
" "
)))
}
...
...
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