成功解决preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous.

目录

解决问题

解决思路

解决方法


解决问题

preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
  if diff:

解决思路

preprocessing\label.py:151:
抛弃警告:空数组的真值是不明确的。返回False,但以后将导致错误。

解决方法

该问题是警告信息,不处理亦可运行程序,只需理解一下即可!但是,该库未来的升级版本中,需要检测是否为空数组,否则视为error!
使用`array.size > 0` 以检查数组是否为空。

成功解决preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous.相关推荐

  1. 成功解决sklearn\preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is amb

    成功解决sklearn\preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is amb ...

  2. 成功解决model_selection\_search.py:584: DeprecationWarning: fit_params as a constructor argument was d

    成功解决model_selection\_search.py:584: DeprecationWarning: "fit_params" as a constructor argu ...

  3. 成功解决model_selection\_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in

    成功解决model_selection\_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in ...

  4. 成功解决sklearn\grid_search.py:42: DeprecationWarning: This module was deprecated in version 0.18 in fav

    成功解决sklearn\grid_search.py:42: DeprecationWarning: This module was deprecated in version 0.18 in fav ...

  5. 成功解决sklearn\cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 i

    成功解决sklearn\cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 i ...

  6. 成功解决Eclipse打开py等文件出现乱码

    成功解决Eclipse打开py等文件出现乱码 目录 解决问题 解决思路 解决方法 解决问题 Eclipse打开py等文件出现中文乱码 解决思路 默认读取文件是以gbk的方式,需要在属性中进行转换一下即 ...

  7. 成功解决Lib\sre_compile.py, line 17, in module assert _sre.MAGICMAGIC SRE module mismatch

    成功解决Lib\sre_compile.py", line 17, in <module>     assert _sre.MAGIC == MAGIC, "SRE m ...

  8. 成功解决\PyInstaller\compat.py, line 378  out = out.decode(encoding) UnicodeDecodeError: utf-8 codec c

    成功解决\PyInstaller\compat.py, line 378  out = out.decode(encoding) UnicodeDecodeError: 'utf-8' codec c ...

  9. 成功解决lib\subprocess.py, line 997, in _execute_child startupinfo) FileNotFoundError: [WinError 2]

    成功解决lib\subprocess.py", line 997, in _execute_child     startupinfo) FileNotFoundError: [WinErr ...

最新文章

  1. 卷积神经网络(CNN)的简单实现(MNIST)
  2. Python学习教程(Python学习路线):Python面试100题(二)
  3. 低成本运行 Spark 数据计算
  4. partial 分部类-庞大类的瘦身计划
  5. linux cpu使用率1200%,linux下用top命令查看cpu利用率超过100%
  6. android sdk eclipse没导入,Android—新的eclipse导入SDK出错解决办法
  7. C++substr()用法
  8. Web前端开发工程师必读de设计博客
  9. stm32烧录软件_使用华为LiteOS Studio开发STM32物联网工程1
  10. ad15原理图中变压器种类_「知识」共轭结构整流变压器低压输出三排八列短网结构引线布置...
  11. css3中2D变形tranform总结(附实例)
  12. 物流项目面试题 整理终版
  13. MATLAB符号计算相关函数
  14. Linux-tftp、tftpd-pha安装、使用、配置教程
  15. Python的伪造数据生成器:Faker
  16. 计算机开机报一长两短,电脑开机发出一长两短报警声启动不了怎么办
  17. vue瀑布流插件vue-waterfall-easy 2.x
  18. java合并word文档和添加分节符
  19. 字跳三轮面试完,我想去读个硕士了T_T
  20. 项目管理 | 怎么开项目启动会?

热门文章

  1. 开源机器学习:R Meets Weka zz
  2. 移动医疗未来还有多少红利?
  3. 使用DocFX生成文档
  4. 局域网内同时使用两台路由器的配置方法
  5. Java 集合框架,看这篇真的够了!
  6. 如何选择 Git 分支模式?
  7. HR 问“你目前有几个 Offer”,聪明人会怎么说?你呢!
  8. 【斩获7枚offer,入职阿里平台事业部】横扫阿里、美团、京东、 去哪儿之后,写下了这篇面经!
  9. Spring Cloud构建微服务架构:服务消费(Ribbon)【Dalston版】
  10. Java面向对象基础整理