成功解决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,修改即可!


相关文章
|
3月前
|
C# Python
Python Tricks : Function Argument Unpacking
Python Tricks : Function Argument Unpacking
29 1
|
5月前
|
TensorFlow API 算法框架/工具
【Tensorflow】解决Inputs to eager execution function cannot be Keras symbolic tensors, but found [<tf.Te
文章讨论了在使用Tensorflow 2.3时遇到的一个错误:"Inputs to eager execution function cannot be Keras symbolic tensors...",这个问题通常与Tensorflow的eager execution(急切执行)模式有关,提供了三种解决这个问题的方法。
56 1
|
6月前
|
SQL 数据库连接 数据库
【Python】已完美解决:executemany() takes exactly 2 positional arguments (3 given)
【Python】已完美解决:executemany() takes exactly 2 positional arguments (3 given)
109 6
|
6月前
|
Python
【Python】已解决:TypeError: write._Log() takes 0 positional arguments but 1 was given
【Python】已解决:TypeError: write._Log() takes 0 positional arguments but 1 was given
222 0
成功解决 bs4\__init__.py:219: UserWarning: "b'.'" looks like a filename, not markup. You should probably
成功解决 bs4\__init__.py:219: UserWarning: "b'.'" looks like a filename, not markup. You should probably
|
Python
解决ValueError: `validation_split` is only supported for Tensors or NumPy arrays, found following
解决ValueError: `validation_split` is only supported for Tensors or NumPy arrays, found following
658 0
解决ValueError: `validation_split` is only supported for Tensors or NumPy arrays, found following
成功解决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
成功解决Python中出现的ValueError: not enough values to unpack (expected 2, got 1)的问题
成功解决Python中出现的ValueError: not enough values to unpack (expected 2, got 1)的问题
成功解决Python中出现的ValueError: not enough values to unpack (expected 2, got 1)的问题
成功解决\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
成功解决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