当前位置:   article > 正文

ValueError: shapes (a,b) and (a,b) not aligned: b (dim 1) != a (dim 0)_shapes (52,6) and (52,1) not aligned: 6 (dim 1) !=

shapes (52,6) and (52,1) not aligned: 6 (dim 1) != 52 (dim 0)

在将两个维度相同的矩阵做点乘运算时,

result = A*A  #设A的维度是(10000,20)

报错ValueError: shapes (10000,20) and (10000,20) not aligned: 20 (dim 1) != 10000 (dim 0),

将代码改为

result = np.multiply(A,A)

成功解决。  

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/87053
推荐阅读
相关标签
  

闽ICP备14008679号