-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Better srepr
for vectors and some LaTeX improvements
#22663
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
✅ Hi, I am the SymPy bot (v162). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.10. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
assert pretty(Variance(X)) == r'var(X)' | ||
assert pretty(Probability(X > 0)) == r'P(X > 0)' | ||
Y = Normal("Y", mu, sigma) | ||
assert pretty(Covariance(X, Y)) == 'cov(X, Y)' |
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 would probably capitalise Var and Cov
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.
English Wikipedia writes cov, but I see many other sources using Cov (including Swedish Wikipedia). Easily fixed!
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.
This is changed in #22661 (this PR is built on top of that).
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.
Since #22661 is merged current master shows:
In [5]: pretty(Covariance(X, Y))
Out[5]: 'Cov(X, Y)'
Is the intention to change that here?
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 was under the impression that the first commit, which is merged and later overridden elsewhere, would be removed from this PR. But I must have missed how it works (or at least displays).
I'll rebase this and remove that commit.
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.
Hmm, when rebasing that commit was automatically removed anyway. So not sure what would have happened if this was merged as is (and will not find out...).
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) Significantly changed benchmark results (master vs previous release) before after ratio
[907895ac] [ea9c2c2d]
- 4.88±0.01s 366±1ms 0.07 polygon.PolygonArbitraryPoint.time_bench01
+ 3.93±0.04ms 6.73±0.1ms 1.71 solve.TimeMatrixOperations.time_det(4, 2)
+ 4.03±0.09ms 6.60±0.02ms 1.64 solve.TimeMatrixOperations.time_det_bareiss(4, 2)
+ 43.9±0.7ms 83.2±3ms 1.90 solve.TimeMatrixSolvePyDySlow.time_linsolve(1)
+ 45.3±2ms 80.6±0.4ms 1.78 solve.TimeMatrixSolvePyDySlow.time_solve(1)
Full benchmark results can be found as artifacts in GitHub Actions |
4f5b880
to
9600016
Compare
References to other Issues or PRs
Builds on #22661 so that should be merged first.
Related to #22654
Brief description of what is fixed or changed
srepr
forBaseVector
andBaseDyadic
did not return correct code (in the same way as othersrepr
does).DFT
andIDFT
now have better LaTeX-printing.S.Catalan
is now printed asG
(as per the Wiki-link provided as reference and many pther sources).Other comments
Tests added for LaTeX-printing of all(?) NumberSymbols in
S
.Release Notes
S.Catalan
is now printed asG
in LaTeX and pretty printers.DFT
andIDFT
.srepr
forBaseVector
andBaseDyadic
.