C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\sklearn\cluster\_kmeans.py:870: FutureWarning: The default value of `n_init` will change from 10 to 'auto' in 1.4. Set the value of `n_init` explicitly to suppress the warning warnings.warn( C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\sklearn\cluster\_kmeans.py:1382: UserWarning: KMeans is known to have a memory leak on Windows with MKL, when there are less chunks than available threads. You can avoid it by setting the environment variable OMP_NUM_THREADS=1. warnings.warn( Traceback (most recent call last): File "E:\code-study\coda\test.py", line 27, in <module> cluster_data = coords_list[kmeans.labels_ == i] TypeError: only integer scalar arrays can be converted to a scalar index
时间: 2023-07-21 08:46:16 浏览: 239
Python库 | kipoi_conda-0.1.0-py3.5.egg
这是一个 Python 的错误提示,出现了 TypeError。错误的原因是在第 27 行代码中,使用了一个非整数类型的数组作为索引。这种错误通常发生在使用 numpy 数组时,可能是因为数组的类型不正确或者维度不匹配。你可以检查一下代码,看看是否有对非整数类型的数组进行索引的操作。同时,你也可以查看一下数据类型和数组维度是否正确。
阅读全文