Ich muss einige Python (numpy) Code in C# (MathNet) portieren. Ich kann in Python schreiben:Was ist das MathNet-Äquivalent von numpy Array [0 ,:] * = 1.23
mtx = np.array([[0,1,2],[3,4,5]])
mtx[0,:] *= 1.23 #multiply all elements in row 0 by 1.23
Wie kann ich dies tun in MathNet? Gibt es eine bessere (schnellere) Lösung als:
Matrix<double> mtx = Matrix<double>.Build.Dense(2,3);
//...
for(int i = 0; i < mtx.ColumnCount; i++)
mtx[0,i] *= 1.23;
?
Glauben Sie, dass, wenn ich die Bibliothek oft verwenden und intensiver, ich soll die F # Sprache bevorzugen? – ThWin
@ThWin, denke ich, ja. –