Course 1
Assignment 3 error 1
问题代码:
# Visualize the data:
plt.scatter(X[0, :], X[1, :], c=Y, s=40, cmap=plt.cm.Spectral);
执行后报错:
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.flatten(), s=40, cmap=plt.cm.Spectral);
然后就可