Skip to content

Commit 5bc1d0a

Browse files
author
OriginQuantumCloud
authored
【内容纠错与注释补充】example.md
1 parent e98047c commit 5bc1d0a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

docs/【内容纠错与注释补充】example.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ from pyqpanda_alg import QARM
1313
#数据读取
1414
def read(file_path):
1515
if os.path.exists(file_path):
16-
trans_data = []
16+
trans_data = []#......
1717
with open(file_path, 'r', encoding='utf8') as f:
1818
data_line = f.readlines()
19+
#......
1920
if data_line:
2021
for line in data_line:
2122
if line:
@@ -27,7 +28,7 @@ def read(file_path):
2728
raise FileNotFoundError('The file {} does not exists!'.format(file_path))#异常处理,若文件不存在,抛出 FileNotFoundError
2829
return trans_data
2930

30-
31+
#......
3132
if __name__ == '__main__':
3233
data_path = QARM.__path__[0]#获取 QARM 模块的安装路径,用于定位数据集文件夹。
3334
data_file = os.path.join(data_path, 'dataset/data2.txt')#拼接数据文件完整路径。

0 commit comments

Comments
 (0)