import KNNfrom numpy import *def createDataSet(): group = [[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]] labels = ['A','A','B','B'] return group,labels group,labels = KNN.createDataSet()print (createDataSet())
运行时报错
C:\Users\17578\venv\Scripts\python.exe C:/Users/17578/.PyCharm2018.3/config/机器学习实战.py Traceback (most recent call last): File "C:/Users/17578/.PyCharm2018.3/config/机器学习实战.py", line 2, in <module> import KNN File "C:\Users\17578\venv\lib\site-packages\KNN.py", line 24 print(sortedDistIndicies[i]) ^ TabError: inconsistent use of tabs and spaces in indentation
常规的解决TabError的办法都试过了不行,“import KNN"可能还是这个地方有什么问题。
蝴蝶不菲
相关分类