Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
960 views
in Technique[技术] by (1.4k points)

如果x是熊猫系列,为什么乘积x @ A不起作用?

  • A是一个5x5的方形矩阵熊猫DataFrame
  • x是5(一维)矢量熊猫系列

x@AValueError: matrices are not aligned即使它们显然都满足点积乘积的要求,并且具有相同的外部尺寸,也将返回错误5。

x.values @ A工作,返回预期的标量,仅仅是因为x已从“熊猫系列”更改为numpy数组

为什么点符号@对熊猫这么挑剔?


这个人很懒,什么也没留下...
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...