Add explicit casts for MathNet types.
Add explicit casts for MathNet types.