Skip to content
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

DOC: lib/shape_base numpydoc formatting. #18232

Merged
merged 1 commit into from
Jan 26, 2021
Merged

Conversation

Carreau
Copy link
Contributor

@Carreau Carreau commented Jan 26, 2021

Numpydoc parses parameter different depending on whether there is a space
before the colon, for it to be properly interpreted as names and types;
spaces need to be put on each side.

Numpydoc parses parameter different depending on whether there is a space
before the colon, for it to be properly interpreted as names and types;
spaces need to be put on each side.
@mattip
Copy link
Member

mattip commented Jan 26, 2021

I don't see a difference in the rendered documents before and after. Am I missing something?

@Carreau
Copy link
Contributor Author

Carreau commented Jan 26, 2021

Screen Shot 2021-01-26 at 07 21 32

Space before the colon, italic for ndarray. Hard to see for this theme, but could be more proeminent in other.

It's not about the style, it's about the semantic, and it prevent a terminal render I'm working on in IPython to detect that the documented parameters are arr and indices.
Screen Shot 2021-01-26 at 07 23 36

wile a properly spaced items will be detected correctly by numpydoc (here np.where), see how condition, x and y are green so correctly infered.

Screen Shot 2021-01-26 at 07 24 38

@mattip mattip merged commit 11141c4 into numpy:master Jan 26, 2021
@mattip
Copy link
Member

mattip commented Jan 26, 2021

Thanks @Carreau

@Carreau Carreau deleted the shape_base_doc branch March 21, 2022 09:53
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.

None yet

2 participants