博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
plt.scatter(X[0, :], X[1, :], c=Y, s=40, cmap=plt.cm.Spectral)出错
阅读量:4674 次
发布时间:2019-06-09

本文共 272 字,大约阅读时间需要 1 分钟。

ValueError: c of shape (1, 400) not acceptable as a color sequence for x with size 400, y with size 400
# Visualize the data:plt.scatter(X[0, :], X[1, :], c=Y.reshape(400), s=40, cmap=plt.cm.Spectral);

Y改成Y.reshape(400)

转载于:https://www.cnblogs.com/douzujun/p/10291350.html

你可能感兴趣的文章