Python初學者之TypeError: unhashable type: 'list'問題分析

使用Python實現機器學習k-近鄰算法,建立數據集和標籤時,出現了「TypeError: unhashable type: 'list'」錯誤,沒法正確打印出group和labels。python 一、錯誤代碼與錯誤信息算法 具體代碼實例以下:機器學習 from numpy import * import operator def creatDataSet(): group = {[[
相關文章
相關標籤/搜索