I have to port some python (numpy) code in c# (MathNet). I can write in python:
mtx = np.array([[0,1,2],[3,4,5]])
mtx[0,:] *= 1.23 #multiply all elements in row 0 by 1.23
How can I do this in MathNet? Is there better (faster) solution than:
Matrix<double> mtx = Matrix<double>.Build.Dense(2,3);
//...
for(int i = 0; i < mtx.ColumnCount; i++)
mtx[0,i] *= 1.23;
?