Skip to content

Commit 3d2cd8d

Browse files
Update bp_test.py
1 parent 4720f95 commit 3d2cd8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Chapter_6 BP/bp_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ def generate_data():
3434
data[i, 1] = x[i, 1] * 9 - 4.5
3535
# 2、将数据点保存到文件“test_data”中
3636
f = open("test_data", "w")
37-
m,n = np.shape(dataTest)
37+
m,n = np.shape(data)
3838
for i in xrange(m):
3939
tmp =[]
4040
for j in xrange(n):
41-
tmp.append(str(dataTest[i,j]))
41+
tmp.append(str(data[i,j]))
4242
f.write("\t".join(tmp) + "\n")
4343
f.close()
4444

0 commit comments

Comments
 (0)