`DoubleMatrix` has a constructor for `double[][]`. Maybe you can use it directly.