Skip to content

Fix stat command printing NumPy scalar reprs in bounds - #871

Merged
abey79 merged 3 commits into
abey79:masterfrom
Miabeyefendi:fix-stat-bounds-output
Oct 6, 2026
Merged

abey79 merged 3 commits into
abey79:masterfrom
Miabeyefendi:fix-stat-bounds-output

Conversation

@Miabeyefendi

Copy link
Copy Markdown
Contributor

Description

With NumPy 2, the stat command prints bounds as (np.float64(1.4), np.float64(12.4), ...), which is hard to read. Bounds are now converted to plain floats, e.g. (1.4, 12.4, ...). Empty documents still print None. A test covering the output was added.

Checklist

  • feature/fix implemented
  • code formatting and mypy ok (just lint)
  • tests added/updated and pytest succeeds (just test)
  • documentation added/updated
    • command docstring and option/argument help
    • README.md updated (Feature Overview)
    • CHANGELOG.md updated
    • added new command to reference.rst
    • RTD doc updated and building with no error (make clean && make html in docs/)

The bounds printed by `stat` were shown as `np.float64(...)` with NumPy 2. They are now converted to plain floats.

@abey79 abey79 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM, thanks. Can you please fix conflicts?

@Miabeyefendi

Copy link
Copy Markdown
Contributor Author

Can you double check pls, im hobbiest I think did it right

Comment thread CHANGELOG.md Outdated
@abey79
abey79 merged commit 99e412f into abey79:master Oct 6, 2026
10 checks passed
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.

2 participants