You cannot convert it automatically. The problem is that Double in Java means the class java.lang.Double (while in Scala it means scala.Double , which basically matches Double in Java), and therefore the overriding method should return Array[java.lang.Double] , If you have Array[Double] , you can convert it using map :
val v: Array[Double] = ... val v1 = v.map(java.lang.Double.valueOf(_))
You can make this conversion implicit:
implicit def wrapDoubleArray(arr: Array[Double]): Array[java.lang.Double] = arr.map(java.lang.Double.valueOf(_))
but this is a bad idea in most cases.
source share