成功解决FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `ar

目录

解决问题

解决思路

解决方法


解决问题

stats.py:1633: 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.
  return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval

解决思路

未来的警告:不建议使用非元组序列进行多维索引;使用“arr[tuple(seq)]”而不是“arr[seq]”。将来,这将被解释为一个数组索引' arr[np.array(seq)] ',它将导致错误或不同的结果。
  return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval

解决方法

此信息提示为警告,而不是error,即使不处理也不会影响代码编程的运行。如果想要去掉,可以更新库至最新版本!
然后根据提示修改使用方法!
如果想要去掉,可以根据提示采用改进的方法!

将arr[seq]改为arr[tuple(seq)]即可!

成功解决FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `ar相关推荐

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

    使用scipy模块时出现警告:FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated ...

  2. 成功解决Type Error: can‘t multiply sequence by non-int of type ‘float‘

    成功解决Type Error: can't multiply sequence by non-int of type 'float' 目录 解决问题 解决思路 解决方法 解决问题 File " ...

  3. 成功解决FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.

    成功解决FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values. ...

  4. 成功解决matplotlib\axes\_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been repla

    成功解决matplotlib\axes\_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been repla ...

  5. 成功解决read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and wil

    成功解决read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and wil ...

  6. 成功解决linear_model\stochastic_gradient.py:128: FutureWarning: max_iter and tol parameters have been ad

    成功解决linear_model\stochastic_gradient.py:128: FutureWarning: max_iter and tol parameters have been ad ...

  7. 成功解决TypeError: ‘tuple‘ object is not callable

    成功解决TypeError: 'tuple' object is not callable 目录 解决问题 解决思路 解决方法 解决问题 TypeError: 'tuple' object is no ...

  8. 成功解决TypeError: sequence item 0: expected str instance, list found

    成功解决TypeError: sequence item 0: expected str instance, list found 目录 解决问题 解决思路 解决方法 解决问题 TypeError: ...

  9. 成功解决UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xba in position 2: illegal multibyte sequence

    成功解决UnicodeDecodeError: 'gbk' codec can't decode byte 0xba in position 2: illegal multibyte sequence ...

最新文章

  1. html 流动效果,html5 canvas流动的海浪特效
  2. Linux安装Oracle11G
  3. Pytorch Document学习笔记
  4. wget使用tsocks
  5. 图论--SCC缩点--Tarjan
  6. hdu 1848(Fibonacci again and again)(SG博弈)
  7. mariadb数据库基础
  8. 模块化(1):基本思路
  9. 虚拟机装xp 架设服务器,VMware安装虚拟机系统ghost xp sp3步骤图解
  10. protues8.9安装【硬件课设】
  11. [PTA] 7-6 厘米换算英尺英寸
  12. 手机app访问服务器数据库数据库文件夹,手机app怎么访问服务器数据库
  13. 福昕PDF开启多实例
  14. 单臂路由+VRRP(多个vlan负载分担)
  15. 活跃地址下降,成交量大幅上涨,疑似青黄不接——陀螺财经周报第八期
  16. 工具类-汉字转为汉语拼音首字母
  17. C++设计模式——策略模式(高屋建瓴)
  18. 高效的使用DOM操作
  19. [加密]展讯secureboot方案
  20. MSP430串口波特率寄存器的配置

热门文章

  1. use vue 多个_vue.use 插件系统详解
  2. imx6 板卡移植官方yocto版本(2_定制系统)
  3. 有窗体和无窗体覆盖的问题
  4. Apicloud自定义模块
  5. jQuery的顶级对象 $
  6. 机房收费--组合查询
  7. Java多线程:线程属性
  8. Redis 是怎么实现 “附近的人” 的?
  9. 23个 Git 最常用命令速查手册,值得收藏!
  10. Java 数组升序降序排列Arrays.sort( )通俗易懂