nswamy commented on a change in pull request #11789: [MXNET-319] Reduce Scala
Warning messages
URL: https://github.com/apache/incubator-mxnet/pull/11789#discussion_r203251131
##########
File path: scala-package/core/src/main/scala/org/apache/mxnet/NDArray.scala
##########
@@ -89,7 +89,10 @@ object NDArray extends NDArrayBase {
output match {
case nd: NDArray => (Array(nd), Array(nd.handle))
case ndFuncRet: NDArrayFuncReturn => (ndFuncRet.arr,
ndFuncRet.arr.map(_.handle))
- case ndArr: Seq[NDArray] => (ndArr.toArray,
ndArr.toArray.map(_.handle))
+ case ndArr: Seq[NDArray @unchecked] =>
+ if (ndArr.head.isInstanceOf[NDArray]) (ndArr.toArray,
ndArr.toArray.map(_.handle))
Review comment:
Why `@unchecked` and again the need to check if the head is a Instance of
NDArray?
----------------------------------------------------------------
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