Skip to content

DOC: Add ufunc docstring to generated docs.#16919

Merged
mattip merged 1 commit intonumpy:masterfrom
rossbar:doc/add_ufunc
Jul 21, 2020
Merged

DOC: Add ufunc docstring to generated docs.#16919
mattip merged 1 commit intonumpy:masterfrom
rossbar:doc/add_ufunc

Conversation

@rossbar
Copy link
Contributor

@rossbar rossbar commented Jul 21, 2020

Closes #16791

Adds the ufunc class to the documentation so that it is included
in the generated html docs and all links to it work.

A slight modification to the ufunc docstring was necessary to suppress a warning during the doc build process.

Adds the ufunc class to the documentation so that it is included
in the generated html docs and all links to it work.

Slightly modify ufunc docstring to remove unrecognized heading
name.
@rossbar
Copy link
Contributor Author

rossbar commented Jul 21, 2020

Close/Reopen for CI

@rossbar rossbar closed this Jul 21, 2020
@rossbar rossbar reopened this Jul 21, 2020
@mattip
Copy link
Member

mattip commented Jul 21, 2020

The page has all the extra info about the class on it and not on the class sub-page. I think the entire section should be moved to a new page and reformatted.

@eric-wieser
Copy link
Member

eric-wieser commented Jul 21, 2020

It would be good if we could pull the __call__ argument docstrings out of the rst and put them into __call__.__doc__.

Once we've done that, we can put the docstrings back in the rst with ..automethod:: ufunc.__call__ etc.

@mattip
Copy link
Member

mattip commented Jul 21, 2020

We could just put this in as-is since the new page is no worse than the old one. On the other hand, now we have a subpage, which did not exist before. @rossbar - thoughts?

@rossbar
Copy link
Contributor Author

rossbar commented Jul 21, 2020

I don't have any particular preferences/ideas on the organization. The main reason I chose to add it in this was was that it was very simple and would fix some broken links in the rendered docs.

We could add a new subpage (e.g. routines.ufuncs.rst to match the pattern in doc/source/reference) and move the info that is currently under the Optional Keyword Arguments, Methods, and Attributes headings in ufuncs.rst to corresponding headings in routines.ufuncs.rst. I'm not sure whether that's what you had in mind?

@mattip
Copy link
Member

mattip commented Jul 21, 2020

Yes, a new subpage was my intention. The question is if we should do it in this PR or in a follow-on one.

@mattip
Copy link
Member

mattip commented Jul 21, 2020

.. and if you at all agree that it is an improvement

@rossbar
Copy link
Contributor Author

rossbar commented Jul 21, 2020

and if you at all agree that it is an improvement

I think it would be, though I also think it might take a decent chunk of effort to get the reorganization right, especially since there are links that point to the ufunc page in the refguide that would probably then be better pointed at the new subpage

@mattip
Copy link
Member

mattip commented Jul 21, 2020

OK, let's put this in as-is then.

@mattip mattip merged commit 82efaab into numpy:master Jul 21, 2020
@mattip
Copy link
Member

mattip commented Jul 21, 2020

Thanks @rossbar

@rossbar
Copy link
Contributor Author

rossbar commented Jul 21, 2020

I am going to open an issue to keep track of the subpage suggestion. I also found this file which appears not to be connected to the generated documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ufunc doc not in html build ?

3 participants