numpy / numpy/numpydoc

The Returns section

Open
#183 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
355
Forks
181
Avg merge
1d 9h
Merged PRs (30d)
3

Description

What are the expected behavior in the return section when the output variable name is not given?

In the documentation it is written that the variable name is optional and that you can write for example

Returns
--------
int

That is true but the int became bold and for example

Returns
--------
`axes.Axes`

doesn't get formatted into a link and looks ugly.

Is this the intended behavior or is it a bug in matplotlib (that I have worked with) or numpy docs?

Are there any method to get nice formatting in the Returns section without having to came up with an output variable name?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the documented Returns examples from the issue and inspect how numpydoc formats an omitted output variable name, including the int and axes.Axes cases. Determine whether the behavior is intended or a formatting bug, then document the expected result and verify the examples produce it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.