numpy中的矩阵乘法

numpy中的矩阵乘法

import numpy as np

mat = np.array([[0.999351, 0.00815139,   0.0350837,    0.392437],
                [-0.00577338,    0.997712,  -0.0673561,    -33.0907],
                [-0.0355525,   0.0671099,    0.997112,     91.4815],
                [        0,           0,           0,           1]])
a = np.array([-81.3459, -40.2555, -194.279, 1.0])
b = np.dot(mat, a)
b

输出:

array([ -88.04483394,  -59.69857887, -102.04591472,    1.        ])

猜你喜欢

转载自blog.csdn.net/juluwangriyue/article/details/123679030