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:
[email protected]
With regards,
Apache Git Services