转载自链接:https://blog.youkuaiyun.com/itnerd/article/details/83444867
结论:
元素乘法:np.multiply(a,b)
矩阵乘法:np.dot(a,b) 或 np.matmul(a,b) 或 a.dot(b)
唯独注意:*,在 np.array 中重载为元素乘法,在 np.matrix 中重载为矩阵乘法!
转载自链接:https://blog.youkuaiyun.com/itnerd/article/details/83444867
元素乘法:np.multiply(a,b)
矩阵乘法:np.dot(a,b) 或 np.matmul(a,b) 或 a.dot(b)
唯独注意:*,在 np.array 中重载为元素乘法,在 np.matrix 中重载为矩阵乘法!