我一直在运行一个课程,我已经为过去几天的分类编码而没有任何问题,突然间Anaconda的Spyder崩溃并需要重新启动。 现在,在以前没有引起问题的相同代码上,我收到以下错误:
C:\Users\app\anacondasoftware\lib\site-packages\numpy\linalg\linalg.py:1327:
DeprecationWarning: Implicitly casting between incompatible kinds. In a future
numpy release, this will raise an error. Use casting="unsafe" if this is
intentional.
u, s, vt = gufunc(a, signature=signature, extobj=extobj)
当程序到达这行代码时会弹出此错误:
temp_g = sm.WLS(y1, self.X, w).fit()
上面我已经完成了import statsmodels.api as sm
我真的不知道出了什么问题。出错后,我会看到一个对话框,询问我是要关闭程序还是调试它。当我选择调试时,它会说
Unhandled exception at 0x1e0ee4fc in python.exe: 0xC0000005: Access violation writing location 0x00000000.
有没有人知道该怎么做,或者哪些可能出错?根据错误,我可以在代码中添加casting="unsafe"
的方式和位置。
答案 0 :(得分:0)
我会删除这个问题,但决定不要,以防其他人有同样的问题。基本上,在最初的崩溃之后,我忘记了运行哪个Anaconda / Spyder / Python版本,所以我在我的64位机器上运行32位版本。
当我切换回64位版本时,一切都恢复正常。