最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

This application has requested the Runtime to terminate it in an unusual way. Please contact the app

常识 admin 56浏览 0评论

This application has requested the Runtime to terminate it in an unusual way. Please contact the app


在做机器学习实战第九章的实验,使用Tkinter和matplotlib绘制回归树和模型树时,代码没有问题但是抛出了如下错误

ValueError: Masked arrays must be 1-D

Fatal Python error: PyEval_RestoreThread: NULL tstate


This application has requested the Runtime to terminate it in an unusual way.

Please contact the application's support team for more information.


在网上找了很久也没找到答案,最后发现是scatter语句出现了问题:

原来的scatter语句:

reDraw.a.scatter(reDraw.rawDat[:,0], reDraw.rawDat[:,1], s=5)
应改为:

reDraw.a.scatter([reDraw.rawDat[:,0]], [reDraw.rawDat[:,1]], s=5)

不懂得可以自己打印一下reDraw.rawDat[:,0]和reDraw.rawDat[:,1]看一看

This application has requested the Runtime to terminate it in an unusual way. Please contact the app


在做机器学习实战第九章的实验,使用Tkinter和matplotlib绘制回归树和模型树时,代码没有问题但是抛出了如下错误

ValueError: Masked arrays must be 1-D

Fatal Python error: PyEval_RestoreThread: NULL tstate


This application has requested the Runtime to terminate it in an unusual way.

Please contact the application's support team for more information.


在网上找了很久也没找到答案,最后发现是scatter语句出现了问题:

原来的scatter语句:

reDraw.a.scatter(reDraw.rawDat[:,0], reDraw.rawDat[:,1], s=5)
应改为:

reDraw.a.scatter([reDraw.rawDat[:,0]], [reDraw.rawDat[:,1]], s=5)

不懂得可以自己打印一下reDraw.rawDat[:,0]和reDraw.rawDat[:,1]看一看

发布评论

评论列表 (0)

  1. 暂无评论