-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
DOC: allow jax to correctly reference numpy documentation #22162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Are there more pages that need the directive? |
LGTM. For the curious, this PR does not change the number of warnings in our pedantic mode doc build, both before and after there are 183 warnings about "reference not found" |
Just a note, since I was credited with this: I'm not certain this is the correct fix. What I am certain of is that certain ufuncs in the NumPy documentation currently do not correctly generate cross-reference hyperlinks. For example, if cross-links were generated correctly, I believe every entry in the third column of this table in NumPy's docs would have a hyperlink, but for some reason only We see the same thing in JAX when we use intersphinx to attempt to generate cross-links to these function, but note that this is an issue in NumPy even without any reference to the JAX project. I haven't checked whether the suggested fix here fixes the issue, but I came up with it as a possible culprit after a few minutes of browsing the doc source and trying to figure out what may have been different between |
@rossbar if you think this is probably right, lets give it a shot? |
According to the objects.inv, the ufunc link targets are listed under the I do think it would be an improvement if the generated ufunc stubs were recognized by the
The link to Alternatively, if it's easy for you to update the role which is used to link the numpy ufuncs in the jax docs to |
I don't have a way of testing this locally, but @jakevdp might be able to check! |
@rossbar is there a point in doing this whether it helps or not? In that case, maybe we should just merge, otherwise maybe simply close (can always reopen/open a new PR)? |
@seberg I would vote in favor of just merging! |
It seems the fun trick to make it |
@jakevdp pointed out this might be necessary in order to get jax documentation links pointing to numpy's to correctly parse the numpy hyper-links.
The discussion that triggered this comment started here
@rgommers WDYT?