-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Fixed rendering of Clebsch-Gordan (CG) class #21769
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 (v161). 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.9. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
The LaTeX thing should be fixed by fixing the precedence in the printer. If you look at precedence.py, it looks like it needs to define a |
Ah ok, yeah that sounds like a better solution. Perhaps it's also a solution to #19661 and #20959? |
Clarifies the difference between total angular momentum and the angular momenta of the sub-systems. Also adds a link to Clebsch-Gordan in PDG to verify the doctests.
This correctly renders powers of a CG instance
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
[ed9a550f] [12b7787c]
<sympy-1.8^0>
- 9.83±0.01s 5.04±0.02s 0.51 integrate.TimeIntegrationRisch02.time_doit(100)
- 9.92±0.02s 4.96±0.07s 0.50 integrate.TimeIntegrationRisch02.time_doit_risch(100)
+ 83.2±2μs 3.28±0.2ms 39.35 matrices.TimeDiagonalEigenvals.time_eigenvals
- 5.65±0.2ms 3.38±0.2ms 0.60 solve.TimeRationalSystem.time_linsolve(10)
- 3.77±0.07ms 2.43±0.03ms 0.65 solve.TimeSparseSystem.time_linsolve_eqs(30)
Full benchmark results can be found as artifacts in GitHub Actions |
I would put the precedence on the class itself, rather than in precedence.py, since the latex printer is also defined there. I believe you can define |
Ah yes that makes more sense --> 2f5dd66 Hadn't noticed sympy/sympy/printing/precedence.py Lines 123 to 124 in c07fc47
|
Looks good. Can you add release notes entries for the changes? |
Done 👌 |
Looks good, thanks! |
References to other Issues or PRs
Brief description of what is fixed or changed
CG
is squared, for instance (Latex repr of CG with power does not render correctly #21001)Release Notes
CG
to fix latex renderingCG
documentation