Visualize-ML / Book3_Elements-of-Mathematics

Book_3_《数学要素》 | 鸢尾花书:从加减乘除到机器学习;上架;欢迎继续纠错,纠错多的同学还会有赠书!
6.05k stars 1.04k forks source link

Book3_Ch2_07 关于numpy.inner()的一点混乱。 #117

Closed xqrgit closed 3 months ago

xqrgit commented 11 months ago

image 在chapter1中,定义行向量与列向量都为 二维数组,所以在Bk3_Ch2_07.py的配套代码中,定义行向量也是二维数组。当使用numpy.inner()求两个行向量的内积得到的最终print结果是一个二维数组,而非一个标量。这与chapter2中的描述会出现矛盾。 image 所以建议在这里可以进行一下说明。

Visualize-ML commented 11 months ago

确实,需要说明,一维数组、二维数组、行向量、列向量,数学上、数据上之间的关系。请继续批评指正。

On Fri, Aug 4, 2023 at 1:52 PM X @.***> wrote:

[image: image] https://user-images.githubusercontent.com/11772889/258491924-074c7a81-6d0a-4546-b351-00ee0fa1fce4.png 在chapter1中,定义行向量与列向量都为 二维数组,所以在Bk3_Ch2_07.py的配套代码中,定义行向量也是二维数组。当使用numpy.inner()求两个行向量的内积得到的最终print结果是一个二维数组,而非一个标量。这与chapter2中的描述会出现矛盾。 [image: image] https://user-images.githubusercontent.com/11772889/258492968-0c1b3961-f1d1-4b21-bc51-a31787087f09.png 所以建议在这里可以进行一下说明。

— Reply to this email directly, view it on GitHub https://github.com/Visualize-ML/Book3_Elements-of-Mathematics/issues/117, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZHC6V7MT6QWBB44PMATS6LXTUZGNANCNFSM6AAAAAA3EQM6GM . You are receiving this because you are subscribed to this thread.Message ID: @.***>