使用matplotlib繪制散點圖時出現錯誤:
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(myCent[:,0],myCent[:,1],'sk') scatter()方法不支持'sk'這種標記方法。
解決方法:
將scatter換成plot。