Skip to content

DOC: Improve description of the dtype parameter in np.array docstring - #22736

Merged
seberg merged 1 commit into
numpy:mainfrom
melissawm:array-docstring-dtype
Dec 6, 2022
Merged

seberg merged 1 commit into
numpy:mainfrom
melissawm:array-docstring-dtype

Conversation

@melissawm

Copy link
Copy Markdown
Member

Closes #10614

Once the dtype promotion rules are simplified, we can follow up with a more precise explanation.

cc @seberg

@seberg seberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think this is mch better. Maybe we have a cool idea later, will wait a bit in case someone has a great idea, but put it in tomorrow otherwise.

(`dtype`, `order`, etc.).
only be made if ``__array__`` returns a copy, if obj is a nested
sequence, or if a copy is needed to satisfy any of the other
requirements (``dtype``, ``order``, etc.).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, we do use single ticks for arguments, but I think here both makes sense in either case :).

@seberg

seberg commented Dec 6, 2022

Copy link
Copy Markdown
Member

OK, going to put it in since I think it is an improvement and we can easily follow up on it. Thanks again. (not bothering about a line being one character long)

@seberg
seberg merged commit 28c81bc into numpy:main Dec 6, 2022
@Atcold

Atcold commented Dec 6, 2022

Copy link
Copy Markdown

Awesome! Thanks for fixing the docs! 🥳

@melissawm
melissawm deleted the array-docstring-dtype branch December 12, 2022 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: Improve the description of the dtype parameter in numpy.array docstring

3 participants