I tried to add pull request ...
Currently it is
if (x.Length != weights.Length)
throw new DimensionMismatchException("weights", "Data w....
I believe it should be
if (x**# [0]**.Length != weights.Length)
throw new DimensionMismatchException("weights", "Data w....
the weighting should be apply to each element in the array of arrays, not to each element in the array.