Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k 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 OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...