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

版权声明:本文为博主原创文章,转载请附上博文链接! https://blog.csdn.net/weixin_38314865/article/details/85377512

使用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

猜你喜欢

转载自blog.csdn.net/weixin_38314865/article/details/85377512