Visualize-ML / Book3_Elements-of-Mathematics

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

Bk3_Ch6_01.py运行报错 #159

Closed sonilics12 closed 4 months ago

sonilics12 commented 5 months ago

第23行 ax = fig.gca(projection='3d') 运行报错 : TypeError: FigureBase.gca() got an unexpected keyword argument 'projection'

我的修改 ax = fig.add_subplot(111, projection='3d')

是因为引用库中的接口升级了吗?

Visualize-ML commented 4 months ago

有些语句确实弃用了,后续肯定要把代码调整一遍;请继续批评指正。

On Fri, May 3, 2024 at 12:21 AM Frank FreeMan @.***> wrote:

第23行 ax = fig.gca(projection='3d') 运行报错 : TypeError: FigureBase.gca() got an unexpected keyword argument 'projection'

我的修改 from mpl_toolkits.mplot3d import Axes3D ax = fig.add_subplot(111, projection='3d')

是因为引用库中的接口升级了吗?

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

sonilics12 commented 4 months ago

建议把运行环境需要的三方依赖库的版本号说明一下, 书的改版很难跟得上库版本升级.