成功解决gensim\matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int

简介: 成功解决gensim\matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int

解决问题


gensim\matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int32 == np.dtype(int).type`.

 if np.issubdtype(vec.dtype, np.int):



解决思路


gensim \ matutils   版本升级警告:issubdtype 的第二个参数从“int”转换为“np.signedinteger”是弃用。

将来,它将被视为' np.int32 == np.dtype(int).type '。如果np.issubdtype (vec)。dtype np.int):



解决方法


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

然后根据提示修改使用方法!

根据提示,可知该方法的类型发生改变,即np.int32 == np.dtype(int).type,修改即可!


相关文章
|
机器学习/深度学习 PyTorch 算法框架/工具
解决Pytorch中RuntimeError: expected scalar type Double but found Float
解决Pytorch中RuntimeError: expected scalar type Double but found Float
2427 0
|
TensorFlow 算法框架/工具
解决TypeError: tf__update_state() got an unexpected keyword argument ‘sample_weight‘
解决TypeError: tf__update_state() got an unexpected keyword argument ‘sample_weight‘
230 0
解决TypeError: tf__update_state() got an unexpected keyword argument ‘sample_weight‘
onnx-tensorrt:builtin_op_importers.cpp:628:5: error: ‘IIdentityLayer’ is not a member of ‘nvinfer1’
onnx-tensorrt:builtin_op_importers.cpp:628:5: error: ‘IIdentityLayer’ is not a member of ‘nvinfer1’
78 0
成功解决Exception: Graph file doesn't exist, path=F:\File_Python\Python_example\Human_Posture_Detection\
成功解决Exception: Graph file doesn't exist, path=F:\File_Python\Python_example\Human_Posture_Detection\
1. (arg0: bool) -> mediapipe.python._framework_bindings.packet.Packet
1. (arg0: bool) -> mediapipe.python._framework_bindings.packet.Packet
916 0
成功解决absl.flags._exceptions.IllegalFlagValueError: flag --train_size=inf: Expect argument to be a str
成功解决absl.flags._exceptions.IllegalFlagValueError: flag --train_size=inf: Expect argument to be a str
成功解决\h5py\__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float
成功解决\h5py\__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float
成功解决h5py\_init_.py:26:FutureWarning: Conversion of the second argument of issubdtype from `float` to
成功解决h5py\_init_.py:26:FutureWarning: Conversion of the second argument of issubdtype from `float` to
成功解决h5py\_init_.py:26:FutureWarning: Conversion of the second argument of issubdtype from `float` to
成功解决Exception: Graph file doesn't exist, path=F:\File_Python\Python_example\Human_Posture_Detection\
成功解决Exception: Graph file doesn't exist, path=F:\File_Python\Python_example\Human_Posture_Detection\
|
TensorFlow 算法框架/工具 Python
成功解决tensorflow\contrib\learn\python\learn\datasets\base._internal_retry.<locals>.wrap.<locals>.wrapp
成功解决tensorflow\contrib\learn\python\learn\datasets\base._internal_retry.<locals>.wrap.<locals>.wrapp