We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e98047c commit 5bc1d0aCopy full SHA for 5bc1d0a
1 file changed
docs/【内容纠错与注释补充】example.md
@@ -13,9 +13,10 @@ from pyqpanda_alg import QARM
13
#数据读取
14
def read(file_path):
15
if os.path.exists(file_path):
16
- trans_data = []
+ trans_data = []#......
17
with open(file_path, 'r', encoding='utf8') as f:
18
data_line = f.readlines()
19
+ #......
20
if data_line:
21
for line in data_line:
22
if line:
@@ -27,7 +28,7 @@ def read(file_path):
27
28
raise FileNotFoundError('The file {} does not exists!'.format(file_path))#异常处理,若文件不存在,抛出 FileNotFoundError
29
return trans_data
30
-
31
+#......
32
if __name__ == '__main__':
33
data_path = QARM.__path__[0]#获取 QARM 模块的安装路径,用于定位数据集文件夹。
34
data_file = os.path.join(data_path, 'dataset/data2.txt')#拼接数据文件完整路径。
0 commit comments