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

Fix string formatting for numpy array scalars #1341

Merged
merged 1 commit into from Jun 30, 2021

Conversation

dopplershift
Copy link
Contributor

@dopplershift dopplershift commented Jun 28, 2021

Unlike normal arrays, the scalars do not respond to set_printoptions, so instead normal formatting needs to be used. (See numpy/numpy#11048 for ongoing confusion about this.) Also, for HTML formatting, they are flagged as iterable even though they should be formatted like single values.

  • Executed pre-commit run --all-files with no errors
  • The change is fully covered by automated unit tests
  • Documented in docs/ as appropriate
  • Added an entry to the CHANGES file

Unlike full arrays, these items do not respond to set_printoptions,
instead normal formatting needs to be used.
@jules-ch
Copy link
Collaborator

Looks good !

@jules-ch jules-ch merged commit ceaeee5 into hgrecco:master Jun 30, 2021
@dopplershift dopplershift deleted the scalar-format branch July 2, 2021 01:16
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.

None yet

2 participants