解决Python中FutureWarning: `np.complex128 == np.dtype(complex).type`.问题

在进行数据科学可视化时遇到了`FutureWarning: np.complex128 == np.dtype(complex).type`警告。该问题源于旧版模块。解决方案是更新相关模块,如h5py,通过在终端运行`pip install h5py==2.80rc1`即可解决此警告。
摘要由CSDN通过智能技术生成

今天使用python进行数据科学可视化,运行文件时出现:

Warning (from warnings module):
  File "C:\Users\zouqican\AppData\Local\Programs\Python\Python36\lib\site-packages\tvtk\array_handler.py", line 268
    assert not numpy.issubdtype(z.dtype, complex), \
FutureWarning: Conversion of the second argument of issubdtype from `complex` to `np.complexfloating` is deprecated. In future, it will be treated as `np.complex128 == np.dtype(complex).type`.

头疼,又遇到bug了。。。

查看了一些文章,看了,然后发现是有些模块没有更新导致的

https://stackoverflow.com/questions/48340392/futurewarning-conversion-of-the-second-argument-of-issubdtype-from-float-to

因此我通过更新:在终端输入pip install h5py==2.80rc1  更新h5py模块。

于是问题就决解了。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值