[英]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.