简体   繁体   English

缓冲区的维数错误(预期为 1,得到 2)。 如何拟合尺寸问题?

[英]Buffer has wrong number of dimensions (expected 1, got 2). How to fit the dimensions problem?

import umap.umap_ as umap
#Uniform Manifold Approximation and Projection,find out how distinct our topics are
#https://umap-learn.readthedocs.io/en/latest/
embedding = umap.UMAP(n_neighbors=150, min_dist=0.5,random_state=12).fit_transform(X_topics) 

plt.figure(figsize=(10,8)) 
plt.scatter(embedding[:, 0], 
            embedding[:, 1], 
            c = dataset.target, 
            s = 10, # size 
            edgecolor='none' ) 
plt.show()

ValueError Traceback (most recent call last) in 2 #Uniform Manifold Approximation and Projection,find out how distinct our topics are 3 # https://umap-learn.readthedocs.io/en/latest/ ----> 4 embedding = umap.UMAP(n_neighbors=150, min_dist=0.5,random_state=12).fit_transform(X_topics) 5 6 plt.figure(figsize=(10,8)) ValueError Traceback (last recent call last) in 2 #Uniform Manifold Approximation and Projection,找出我们的主题有多不同 3 # https://umap-learn.readthedocs.io/en/latest/ ----> 4 embedding = umap.UMAP(n_neighbors=150, min_dist=0.5,random_state=12).fit_transform(X_topics) 5 6 plt.figure(figsize=(10,8))

ValueError: Buffer has wrong number of dimensions (expected 1, got 2) ValueError:缓冲区的维数错误(预期为 1,得到 2)

I have the same issue.我有同样的问题。 I downloaded the source code and ran it locally to try and debug it, but wierdly enough, the local version worked smoothly.我下载了源代码并在本地运行以尝试调试它,但奇怪的是,本地版本运行顺利。 You can try that if you want a quick fix.如果您想快速修复,可以尝试一下。 No idea on what is actually happening though...虽然不知道实际发生了什么......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 缓冲区的维数错误(预期为 1,得到 2) - Buffer has wrong number of dimensions (expected 1, got 2) 熊猫:“ ValueError:缓冲区的维数错误(预期1,得到0) - Pandas: "ValueError: Buffer has wrong number of dimensions (expected 1, got 0) ValueError:如果在语句中,则缓冲区的维数错误(预期为1,得到2) - ValueError: Buffer has wrong number of dimensions (expected 1, got 2) on if in statement Python scikits - 缓冲区的维数错误(预期1,得2) - Python scikits - Buffer has wrong number of dimensions (expected 1, got 2) Cython ValueError:缓冲区的维数错误(预期2,得3) - Cython ValueError: Buffer has wrong number of dimensions (expected 2, got 3) pd.cut:缓冲区的维数错误(预期为 1,得到 2) - pd.cut: Buffer has wrong number of dimensions (expected 1, got 2) Pandas ValueError:缓冲区的维数错误(预期为 1,得到 2) - Pandas ValueError: Buffer has wrong number of dimensions (expected 1, got 2) 错误:ValueError:缓冲区的维数错误(预期为 1,得到 2) - Error:ValueError: Buffer has wrong number of dimensions (expected 1, got 2) 错误的维度数:预期 1,得到 2 - Wrong number of dimensions: expected 1, got 2 ValueError:使用Seaborn时,缓冲区的维数错误(预期为1,为2) - ValueError: Buffer has wrong number of dimensions (expected 1, got 2) when using seaborn
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM