scikitlearn intersphinx链接/库存对象?

2024-10-05 14:31:41 发布

您现在位置:Python中文网/ 问答频道 /正文

是否有人成功地与scikit联系起来,与Interspinx学习。这是一个sphinx项目,看起来好像是通过github页面托管的

https://github.com/scikit-learn/scikit-learn.github.io

但到目前为止,我还没能在我的斯芬克斯项目中生成完整的链接来登陆scikit学习页面

当前正在使用

'sklearn': ('http://scikit-learn.org/stable' None)

在我的interspinx地图中,任何帮助都会很好,谢谢


Tags: 项目httpsioorggithubcomhttp链接
2条回答

intersphinx映射中缺少逗号:

'sklearn': ('http://scikit-learn.org/stable' None)

应该是:

^{pr2}$

我在dict条目中使用尾随逗号,但它们不是必需的。在

通过这个修正,我可以使用@mzjn在他们的评论中提供的条目来生成一个到scikitlearn文档的链接。在

从这个issue链接这个PR看来,您应该使用:

'sklearn': ('http://scikit-learn.org/stable',
            (None, './_intersphinx/sklearn-objects.inv'))

注:未测试,但对结果感兴趣,请让我知道它是否有效。在


编辑:

似乎sklearn-objects.inv可从scikit image repo获得,用于本地interspinx设置。 这可能不是最好的解决办法,但也许它可以帮助我们开始。在

我假设您已经尝试直接链接到scikitlearn的documentation page,或者可能链接到项目的API page(但我还是问,以防万一…)。 我确定斯芬克斯博士在这页上指出的是不合适的。在

A dictionary mapping unique identifiers to a tuple (target, inventory). Each target is the base URI of a foreign Sphinx documentation set and can be a local path or an HTTP URI. The inventory indicates where the inventory file can be found: it can be None (at the same location as the base URI) or another local or HTTP URI.

否则还有一个^{}可以帮助构建一个自定义interspinx对象.inv,但我还没来得及测试。在

相关问题 更多 >