SPARK-2149. Univariate kernel density estimation

Traversing arrays this way is to avoid copying?