You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ns...@apache.org on 2018/05/25 21:09:09 UTC

[incubator-mxnet] branch master updated: [MXNET-386] NDArray Bug fix (#11063)

This is an automated email from the ASF dual-hosted git repository.

nswamy 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 1ac2bce  [MXNET-386] NDArray Bug fix (#11063)
1ac2bce is described below

commit 1ac2bce3c4f7900a07e714891bfba1bddc3460e6
Author: Lanking <la...@live.com>
AuthorDate: Fri May 25 14:09:00 2018 -0700

    [MXNET-386] NDArray Bug fix (#11063)
    
    NDArray Bug fix
---
 .../macros/src/main/scala/org/apache/mxnet/NDArrayMacro.scala       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scala-package/macros/src/main/scala/org/apache/mxnet/NDArrayMacro.scala b/scala-package/macros/src/main/scala/org/apache/mxnet/NDArrayMacro.scala
index bbe786f..56cc325 100644
--- a/scala-package/macros/src/main/scala/org/apache/mxnet/NDArrayMacro.scala
+++ b/scala-package/macros/src/main/scala/org/apache/mxnet/NDArrayMacro.scala
@@ -92,9 +92,11 @@ private[mxnet] object NDArrayMacro {
     val isContrib: Boolean = c.prefix.tree match {
       case q"new AddNDArrayAPIs($b)" => c.eval[Boolean](c.Expr(b))
     }
+
     val newNDArrayFunctions = {
-      if (isContrib) ndarrayFunctions.filter(_.name.startsWith("_contrib_"))
-      else ndarrayFunctions.filter(!_.name.startsWith("_contrib_"))
+      if (isContrib) ndarrayFunctions.filter(
+        func => func.name.startsWith("_contrib_") || !func.name.startsWith("_"))
+      else ndarrayFunctions.filterNot(_.name.startsWith("_"))
     }
 
     val functionDefs = newNDArrayFunctions map { ndarrayfunction =>

-- 
To stop receiving notification emails like this one, please contact
nswamy@apache.org.