piyushghai commented on a change in pull request #13678: [MXNET-1260] Float64
DType computation support in Scala/Java
URL: https://github.com/apache/incubator-mxnet/pull/13678#discussion_r246895702
##########
File path:
scala-package/core/src/main/scala/org/apache/mxnet/javaapi/NDArray.scala
##########
@@ -172,6 +189,18 @@ object NDArray extends NDArrayBase {
= org.apache.mxnet.NDArray.array(
sourceArr.asScala.map(ele => Float.unbox(ele)).toArray, shape, ctx)
+ /**
+ * Create a new NDArray that copies content from source_array.
+ * @param sourceArr Source data (list of Doubles) to create NDArray from.
+ * @param shape shape of the NDArray
+ * @param ctx The context of the NDArray, default to current default
context.
+ * @return The created NDArray.
+ */
+ def arrayWithDouble(sourceArr: java.util.List[java.lang.Double], shape:
Shape,
Review comment:
That seems a good suggestion. Basically we should use Iterable as a super
class for this method, rather than a subclass.
I can take it up in a separate PR other than this.
I created a backlog JIRA item to track this :
https://issues.apache.org/jira/browse/MXNET-1293
----------------------------------------------------------------
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