Why is this scala.Double.box needed? Doesn't Array[Double] turn into a double[] in Java?