考虑以下代码:
A=np.asmatrix([[1, 2],[3,4]])
B=[np.asmatrix([[2,0],[0,2]]), np.asmatrix([[10,0],[0,10]])]我想做一个矩阵乘法,它将返回我:
C=[A@B[0], A@B[1]]
有没有内置的方法可以做到这一点?
发布于 2019-04-26 21:34:20
使用理解:
c = [A@E for E in B]https://stackoverflow.com/questions/55868775
复制相似问题