expandToRectangular

fun expandToRectangular(array2D: Array<DoubleArray>, fillValue: Double = 0.0): Array<DoubleArray>

Copies the supplied 2-D array by expanding to the maximum number of columns of the supplied (ragged) array so that the returned array is rectangular, where all row arrays have the same number of elements (columns).

The expanded elements will be filled with the supplied fill value

Return

the copy

Parameters

array2D

the array to copy

fillValue

the value to fill if needed, default is 0.0