-
-
Notifications
You must be signed in to change notification settings - Fork 12k
MAINT: fix first power in polynomials display. #21696
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm faintly -0 on this. It seems like a verbose special casing (in code) for what is unambiguous to begin with.
|
@HaoZeke Not sure what you mean. Here's the existing code special casing the very same thing in latex representation: numpy/numpy/polynomial/polynomial.py Lines 1525 to 1530 in e05e657
I just did the same for string representation. Can you elaborate? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following precedent as noted by @axil, this looks alright. Pending fixes to the tests of course.
|
Lot of failing tests that expect the old style. |
@charris Yes, there's some work to do. I wanted to get principal approval at the meeting to understand that I won't do meaningless work fixing the tests. I'll fix them today. |
|
The tests proved to be deeply interconnected with the PR for #21653, so even if I make the tests pass in this PR it will result in a nontrivial merge conflict with that PR. So either |
|
Yes, this PR may be closed now. I'll merge fixes for both issues into the PR #21654. |
) * limit the number of decimals in Polynomial representation * tests pass * parenthesize exponential notation in polynomials * fixed a long line warning * added polynomial printoptions tests * polynomial printoptions typo fixed * made switch to exp notation in polynomial display more natural * added a test on switching polynomials to exp notation * fixed linter errors/warnings * support for nanstr and infstr printoptions in polynomials * 10^8 threshold for switching to exp notation when displaying polynomials * merged in PR #21696 fixing issue #21695 * made linter happy * made some docstring tests pass * fixed the docs Co-authored-by: Lev Maximov <[email protected]>
Fixes #21695.