From 1be5a5e34b717d585e5eeb8d61b2f8a2f58e0cc0 Mon Sep 17 00:00:00 2001 From: Qing Date: Tue, 11 Dec 2018 15:28:37 -0800 Subject: [PATCH] add test changes --- .../core/src/main/scala/org/apache/mxnet/NDArray.scala | 1 - .../core/src/main/scala/org/apache/mxnet/Symbol.scala | 1 - .../core/src/test/scala/org/apache/mxnet/NDArraySuite.scala | 5 +++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/NDArray.scala b/scala-package/core/src/main/scala/org/apache/mxnet/NDArray.scala index da2b18de76b8..3a0c3c11f16a 100644 --- a/scala-package/core/src/main/scala/org/apache/mxnet/NDArray.scala +++ b/scala-package/core/src/main/scala/org/apache/mxnet/NDArray.scala @@ -35,7 +35,6 @@ import scala.ref.WeakReference @AddNDArrayFunctions(false) object NDArray extends NDArrayBase { implicit def getFirstResult(ret: NDArrayFuncReturn): NDArray = ret(0) - implicit def someWrapper[A](noSome : A) : Option[A] = Option(noSome) private val logger = LoggerFactory.getLogger(classOf[NDArray]) private val functions: Map[String, NDArrayFunction] = initNDArrayModule() diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/Symbol.scala b/scala-package/core/src/main/scala/org/apache/mxnet/Symbol.scala index a777a96963c6..01349a689b6c 100644 --- a/scala-package/core/src/main/scala/org/apache/mxnet/Symbol.scala +++ b/scala-package/core/src/main/scala/org/apache/mxnet/Symbol.scala @@ -841,7 +841,6 @@ object Symbol extends SymbolBase { private val functions: Map[String, SymbolFunction] = initSymbolModule() private val bindReqMap = Map("null" -> 0, "write" -> 1, "add" -> 3) - implicit def someWrapper[A](noSome : A) : Option[A] = Option(noSome) val api = SymbolAPI def pow(sym1: Symbol, sym2: Symbol): Symbol = { diff --git a/scala-package/core/src/test/scala/org/apache/mxnet/NDArraySuite.scala b/scala-package/core/src/test/scala/org/apache/mxnet/NDArraySuite.scala index 61bf9341d7ee..c9ae668062a2 100644 --- a/scala-package/core/src/test/scala/org/apache/mxnet/NDArraySuite.scala +++ b/scala-package/core/src/test/scala/org/apache/mxnet/NDArraySuite.scala @@ -580,7 +580,8 @@ class NDArraySuite extends FunSuite with BeforeAndAfterAll with Matchers { test("Generated api") { import org.apache.mxnet.util.SomeConversion._ val arr = NDArray.ones(Shape(1, 2), dtype = DType.Float64) - NDArray.api.norm(arr, ord = 0, out = arr) - val result = NDArray.api.dot(arr, arr) + val arr2 = NDArray.ones(Shape(1), dtype = DType.Float64) + NDArray.api.norm(arr, ord = 1, out = arr2) + val result = NDArray.api.dot(arr2, arr2) } }