numpy.lib.npyio.DataSource.abspath#
method
- lib.npyio.DataSource.abspath(path)[源代码]#
返回 DataSource 目录中文件的绝对路径.
如果 path 是 URL,则 abspath 将返回文件在本地存在的路径,或者使用 open 方法打开时将存在的路径.
- 参数:
- pathstr 或 pathlib.Path
可以是本地文件或远程 URL.
- 返回:
- outstr
完整路径,包括
DataSource目标目录.
注释
该功能基于
os.path.abspath.