This is an automated email from the ASF dual-hosted git repository. qkou pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push: new b2360f4 [R] fix mx.symbol.min. close #7219 (#7342) b2360f4 is described below commit b2360f4ff5cccbcf09a780d8065ecc4a64ce470f Author: Qiang Kou (KK) <q...@qkou.info> AuthorDate: Sat Aug 5 06:34:03 2017 +0000 [R] fix mx.symbol.min. close #7219 (#7342) --- R-package/R/symbol.R | 11 +++++++++++ R-package/src/export.cc | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/R-package/R/symbol.R b/R-package/R/symbol.R index 541cce4..b97b193 100644 --- a/R-package/R/symbol.R +++ b/R-package/R/symbol.R @@ -60,6 +60,17 @@ mx.symbol.Concat <- function(data, num.args, dim = NULL, name = NULL) { mx.symbol.concat(data, num.args, dim, name) } +#' @export +mx.symbol.min <- function(e1, e2) { + if (is.mx.symbol(e1) && is.mx.symbol(e2)) { + mx.varg.symbol.internal.minimum(list(e1, e2)) + } else if (is.mx.symbol(e1)) { + mx.varg.symbol.internal.minimum_scalar(list(e1, scalar = e2)) + } else if (is.mx.symbol(e2)) { + mx.varg.symbol.internal.minimum_scalar(list(e2, scalar = e1)) + } +} + #' Save an mx.symbol object #' #' @param symbol the \code{mx.symbol} object diff --git a/R-package/src/export.cc b/R-package/src/export.cc index 0e77c1c..2377a02 100644 --- a/R-package/src/export.cc +++ b/R-package/src/export.cc @@ -93,7 +93,10 @@ void Exporter::Export(const std::string& path) { std::string fname = Rcpp::as<std::string>(func_names[i]); // skip internal functions if (fname.find("internal.") != std::string::npos) continue; - if (fname == "mx.varg.symbol.Concat" || fname == "mx.varg.symbol.concat") continue; + if (fname == "mx.varg.symbol.Concat" + || fname == "mx.varg.symbol.concat" + || fname == "mx.varg.symbol.min_axis" + || fname == "mx.varg.symbol.min") continue; Rcpp::List func_info(scope->get_function(fname)); std::string docstr = Rcpp::as<std::string>(func_info[2]); if (docstr.find("@export") == std::string::npos) continue; -- To stop receiving notification emails like this one, please contact ['"comm...@mxnet.apache.org" <comm...@mxnet.apache.org>'].