mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] zachgk commented on a change in pull request #12690: [MXNET-1000] get Ndarray real value and form it from a NDArray
Date Fri, 25 Jan 2019 01:01:06 GMT
zachgk commented on a change in pull request #12690: [MXNET-1000] get Ndarray real value and
form it from a NDArray
URL: https://github.com/apache/incubator-mxnet/pull/12690#discussion_r250834311
 
 

 ##########
 File path: scala-package/core/src/test/scala/org/apache/mxnet/NDArraySuite.scala
 ##########
 @@ -85,6 +89,88 @@ class NDArraySuite extends FunSuite with BeforeAndAfterAll with Matchers
{
     assert(ndarray.toArray === Array(1f, 2f, 3f, 4f))
   }
 
+  test("create NDArray based on Java Matrix") {
+    def arrayGen(num : Any) : Array[Any] = {
+      val arrayBuf = num match {
+        case f: Float =>
+          val arr = ArrayBuffer[Array[Float]]()
 
 Review comment:
   This might help here: https://stackoverflow.com/questions/12300165/how-to-create-a-list-with-the-same-element-n-times

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message