报错如下:
TypeError: ufunc ‘sqrt’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’
原程序:
plt.scatter(k_point[2][i], k_point[3][i], color[i])
修改:
plt.scatter(k_point[2][i], k_point[3][i], c=color[i])
程序的后面缺少等号(即c=)
matplotlib画scatter图报错:TypeError: ufunc 'sqrt' not supported for the input types, and the inputs
最新推荐文章于 2024-06-05 11:18:56 发布