Skip to content

Commit a8024d7

Browse files
修改 python3.x pca 语法错误
1 parent d5379f8 commit a8024d7

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/py3.x/ML/13.PCA/pca.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
def loadDataSet(fileName, delim='\t'):
1616
fr = open(fileName)
1717
stringArr = [line.strip().split(delim) for line in fr.readlines()]
18-
datArr = [list(map(float, line) for line in stringArr)]
18+
datArr = [list(map(float, line)) for line in stringArr]
1919
#注意这里和python2的区别,需要在map函数外加一个list(),否则显示结果为 map at 0x3fed1d0
2020
return mat(datArr)
2121

src/py3.x/NLP/6.LDA/EmailDemo.py

Whitespace-only changes.

0 commit comments

Comments
 (0)