Computator.NET
Computator.NET copied to clipboard
Lack of implicit conversion from MathNet.Numerics.LinearAlgebra.Matrix<double> to MathNet.Numerics.LinearAlgebra.Matrix<System.Numerics.Complex> causes TSL errors
See #https://github.com/mathnet/mathnet-numerics/issues/304 Lack of this implicit conversion causes below TSL code to not run properly: Example below code will throw error:
var n = 5;
var m1 = matrix<real>(n,n);
var m2 = matrix<complex>(n,n);
writeln(m1+m2);

Another example where it will fail:
var m = sqrt(-1)·matrix({{1,0}});
Do you work with the generic base types (Matrix<T>, Vector<T>) or with the explicit types in the sub-namespaces? It seems to me we should rather add conversion on the base types (which essentially call ToComplex etc.) rather than on the explicit types.
@cdrnet Yeah, you are right - sorry I missed that. We only need implicit conversion on the base types.