更新 function.py
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 30s

This commit is contained in:
2024-11-10 15:58:38 +08:00
parent 852312e7ca
commit 4102680f55
+2 -2
View File
@@ -111,8 +111,8 @@ def loadDataSet(filename='dataSet.txt'):
fr = open(filename)
for line in fr.readlines():
lineList = line.strip().split()
# 修改前
dataList.append([1.0, float(lineList[0]), float(lineList[1])])
# 修改后
dataList.append ([float (lineList [0]), float (lineList [1])])
labelList.append(int(lineList[2]))
return dataList, labelList