You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/07/18 04:58:39 UTC
[GitHub] nswamy commented on a change in pull request #11789: [MXNET-319]
Reduce Scala Warning messages
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:
users@infra.apache.org
With regards,
Apache Git Services