Hmm, not sure if we have an overload for this. Tom?
If not, you can easily write your own:
public static double[] ToDouble(int[] array)
{
return array.Select(x => (double)x).ToArray();
}
Then you can invoke it this way:
var intArray = Variable.Observed(new[] { 1, 2, 3 });
var doubleArray = Variable<double[]>.Factor(ToDouble, intArray);
var sum = Variable.Sum(doubleArray);
-Y-