fixes moments so that it doesn't assume mean and variance are same type
URFunc now supports things like max(DenseVector(1.0, 2.0),
DenseVector(2.0, 1.0)) == DenseVector(2.0, 2.0)