Skip to content

DOC: Clarify that numpy.printoptions applies only to ndarray, not… #29450

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

riku-sakamoto
Copy link
Contributor

Overview

This PR added an note for numpy.printoptions

Details

@ngoldbaum
Copy link
Member

Can we also get similar notes in the docstrings for get_printoptions and set_printoptions.

Also you don't have to do this as part of this PR or at all, but in reviewing this I'm noticing we're missing content in the narrative docs about how to print and format arrays. It'd be nice to add some content explaining that outside of the docstrings.

@riku-sakamoto
Copy link
Contributor Author

@ngoldbaum

Thank you for the review!

Can we also get similar notes in the docstrings for get_printoptions and set_printoptions.

Sure! I'll add similar notes to both of those functions.

Also you don't have to do this as part of this PR or at all, but in reviewing this I'm noticing we're missing content in the narrative docs about how to print and format arrays. It'd be nice to add some content explaining that outside of the docstrings.

I totally agree. As you suggested, I'll plan to open a separate PR to address that.

@riku-sakamoto riku-sakamoto force-pushed the improve_documentation_for_printoption branch from 3714b74 to 0c9761c Compare July 28, 2025 23:33
@riku-sakamoto
Copy link
Contributor Author

riku-sakamoto commented Jul 29, 2025

@ngoldbaum

I've added similar descriptions to get_printoptions and set_printoptions.
The CI tests are currently failing, but it appears to be due to a network error based on the error message. So, I think we can ignore it.
If there's anything I should take care of, please let me know.
Thanks!

[Added]
I re-run CI and confirm that it passes.

… scalars

As discussed in numpy#29409, numpy.printoptions applies only to `numpy.ndarray`, not to scalars.
A Note describing this behavior has been added to the docstring.
@riku-sakamoto riku-sakamoto force-pushed the improve_documentation_for_printoption branch from 0c9761c to 32cb498 Compare July 29, 2025 15:59
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy