From ebc14c4621be3c177d989d4085575044f0e7916a Mon Sep 17 00:00:00 2001 From: Qing Date: Tue, 23 Oct 2018 13:22:49 -0700 Subject: [PATCH] add a toString method --- .../core/src/main/scala/org/apache/mxnet/NDArray.scala | 4 ++++ 1 file changed, 4 insertions(+) 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 f5cf32050e1b..40774db772fc 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 @@ -703,6 +703,10 @@ class NDArray private[mxnet](private[mxnet] val handle: NDArrayHandle, checkCall(_LIB.mxNDArraySyncCopyFromCPU(handle, source, source.length)) } + override def toString() : String = { + s"${this.visualize}" + } + /** * Visualize the internal structure of NDArray * @return String that show the structure