标签:fat sklearn python库 理解 绝对路径 foo 当前目录 UNC param
每一个(第三方)模块的导入都需要两个import语句, 如下
在import的时候加了.或者..的py文件是不能直接运行的, 因为这个涉及到模块加载, 在情况下我们不能使用传统的def __main__测试而是使用一个测试文件, 先导入这个模块, 在项目中应该常见一个test目录
# 需要使用SVC类
import sklearn.svm as sksvm
from sklearn.svm import SVC
def foo():
"""brief description of the function
details of the function
Parameters
----------
Arg1 : int
description
Arg2 : int
description
Returns
-------
description
Examples:
---------
name : type
description
"""
标签:fat sklearn python库 理解 绝对路径 foo 当前目录 UNC param
原文地址:https://www.cnblogs.com/megachen/p/10048360.html