Closed
Labels
Document FormattingDocument formatting or styling.Document formatting or styling.MaintenanceBug fix, typo fix, or general maintenance.Bug fix, typo fix, or general maintenance.
Milestone
Description
I am improving CuPy's documentation and hit this issue...
Let's say I want to reference arange from the array API. Ideally, I would expect this should work out of box:
# conf.py
# ...
intersphinx_mapping = {
...
'array_api': ('https://data-apis.org/array-api/2021.12/', None),
...
}
# ...and in anywhere (rst files or docstrings) I could just do
:func:`array_api.arange`
to link to arange. Unfortunately, this does not work, nor does the global version (removing the array_api prefix). Instead I must do this following due to this repo's structure:
:func:`signatures.creation_functions.arange`
This is quite confusing and counter-intuitive. I could work with it, but I am wondering if we could do better, say re-organizing the Python stub files such that array_api.arange works, so opening this issue to collect feedbacks and suggestions.
Reacted by Stephannie Jimenez Gacha
Metadata
Metadata
Assignees
Labels
Document FormattingDocument formatting or styling.Document formatting or styling.MaintenanceBug fix, typo fix, or general maintenance.Bug fix, typo fix, or general maintenance.
Activity
kgryte commentedon May 10, 2022
cc @steff456
rgommers commentedon May 10, 2022
We should fix this, the
signaturespart should be removed.steff456 commentedon May 10, 2022
I've been trying to fix this issue without major luck. I'll give it another check to see if I can remove the signatures and also shorten the amount of writing in a cross reference.
asmeurer commentedon May 10, 2022
Why don't we just rename
signaturestoarray_api?leofang commentedon May 10, 2022
Also in
__init__.pywe need to import all functions to provide a flat namespace (except for the extension modules).leofang commentedon May 23, 2022
@kgryte Is there a way we can "backport" the fix #430 to v2021? It only fixed the
draftversion but not thelatest(or 2021.12) version. Try comparing the outputs and you'll see:kgryte commentedon May 23, 2022
@leofang Yes, this should be possible. Will see what I can do.
rgommers commentedon Mar 9, 2023
I believe this was fixed, the intersphinx content seems consistent across all versions and
signaturesisn't present:So I'll close this - thanks all!