Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BUG: Respect print options in masked array formatting#28698

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
VascoConceicao wants to merge1 commit intonumpy:main
base:main
Choose a base branch
Loading
fromVascoConceicao:bugfix/maskedarray-printoptions

Conversation

VascoConceicao
Copy link

Previously, the string representation of masked arrays did not honor global print options such as floatmode, precision, and suppress. This led to inconsistencies between the display of masked and unmasked arrays.
This update addresses the issue by:

  • Utilizing np.array2string to format the underlying data, ensuring consistency with global print settings.
  • Replacing masked elements with the masked_print_option string ('--' by default) while preserving formatting for visible elements.
  • Maintaining support for legacy formatting options, including truncation with ellipsis (...) when legacy='1.13' is set. (FixesBUG: print options not respected for masked arrays. #28685)

Maybe a bit overkill :)

@VascoConceicaoVascoConceicaoforce-pushed thebugfix/maskedarray-printoptions branch fromf5da334 to7353323CompareApril 13, 2025 15:29
@jorenhamjorenham added the component: numpy.mamasked arrays labelMay 1, 2025
@VascoConceicaoVascoConceicaoforce-pushed thebugfix/maskedarray-printoptions branch 5 times, most recently from43c2dcf to7faa07eCompareMay 9, 2025 12:38
Previously, the string representation of masked arrays did not honorglobal print options such as floatmode, precision, and suppress.This led to inconsistencies between the display of masked andunmasked arrays.This update addresses the issue by:– Utilizing np.array2string to format the underlying data, ensuring  consistency with global print settings.– Replacing masked elements with the masked_print_option string  ('--' by default) while preserving formatting for visible elements.– Maintaining support for legacy formatting options, including  truncation with ellipsis (...) when legacy='1.13' is set.(Fixesnumpy#28685)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
Status: Awaiting a code review
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

BUG: print options not respected for masked arrays.
2 participants
@VascoConceicao@jorenham

[8]ページ先頭

©2009-2025 Movatter.jp