FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated

使用scipy模塊時出現警告:FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.

那是因爲使用的scipy模塊版本太低,比如版本是1.1可能會出現警告,將版本更新至1.2後,警告消失

更新方法:

pip install --upgrade scipy

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章