我正在尋找等效於IDL#操作員的Python numpy
。 這裏是# operator做什麼:什麼是IDL#運算符的Python numpy等價物?
Computes array elements by multiplying the columns of the first array by the rows of the second array. The second array must have the same number of columns as the first array has rows. The resulting array has the same number of columns as the first array and the same number of rows as the second array.
這裏是numpy
數組我處理:
A = [[ 0.9826128 0. 0.18566662]
[ 0. 1. 0. ]
[-0.18566662 0. 0.9826128 ]]
和
B = [[ 1. 0. 0. ]
[ 0.62692564 0.77418869 0.08715574]]
此外,numpy.dot(A,B)
結果ValueError: matrices are not aligned
。
您正在考慮與IDL相同的行列排序。 NumPy遵循數學標準,第一個矩陣中的列數必須等於第二個矩陣中的行數。因此,下面的所有轉換都是「奇怪」的表達。 – mgalloy