mhostetter
mhostetter
Just curious, why was this closed if it's still an open feature request? I just ran into this issue and would greatly appreciate this feature.
I feel the need to share with my fellow Sphinx users an amazing new theme that's solved this issue for me -- [Sphinx Immaterial](https://jbms.github.io/sphinx-immaterial/). It has a feature `python-apigen` that...
I had this problem a while ago, which was why I subscribed to this thread. I found using type hints solves this problem. I don't know if it's worth it...
@photoniker how does this function render? ```python def func(self, val: np.ndarray) -> List[float]: """docstring of func Args: val (int): Input argument Returns: str: return value """ return ```
That's a bummer. It appears that the docstring types supersede the function's actual annotations. I would've hoped for the opposite. There's clearly an issue (as you reported) with how Napoleon...
Here's another workaround... You could attach to [`autodoc-process-docstring`](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#event-autodoc-process-docstring) and find `"np."` and replace it with `"numpy."`. That would then add a link to `numpy.ndarray` in your docs.
Below is an example with OPs function. The same trick can be applied to `nn.Module` to `torch.nn.Module`. Here's the full example project. [foo2-example.zip](https://github.com/sphinx-doc/sphinx/files/9122705/foo2-example.zip) ### Before Notice `np.ndarray` isn't linked. ```python...
Yes, the entire docstring. ```python def func(self, val: np.ndarray) -> List[float]: """docstring of func Here is a detailed docstring. You know :func:`F.interpolate` is a cool function. Args: val (np.ndarray): Input...
You can't filter on `"Args:"`. Sphinx converts the Google-style docstrings `Args:` and `Returns:` sections into rST syntax, which makes it *even easier* to filter. See my example in my previous...
It seems replacing ```python f = ADD(f, MULTIPLY(state[j], taps[j])) ``` with ```python f = ADD(f, MULTIPLY(state[j], taps[j], dtype=dtype), dtype=dtype) ``` resolves the issue. The issue is if the two inputs...