-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Solve matrix equation--documentation guide #23951
Conversation
Main page: use symbolic example
✅ Hi, I am the SymPy bot (v167). 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.12. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
🟠Hi, I am the SymPy bot (v167). I've noticed that some of your commits add or delete files. Since this is sometimes done unintentionally, I wanted to alert you about it. This is an experimental feature of SymPy Bot. If you have any feedback on it, please comment at sympy/sympy-bot#75. The following commits add new files:
If these files were added/deleted on purpose, you can ignore this message. |
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
[41d90958] [b1de2706]
<sympy-1.11.1^0>
- 1.26±0.03ms 837±20μs 0.66 solve.TimeSparseSystem.time_linear_eq_to_matrix(10)
- 3.65±0.1ms 1.59±0.05ms 0.44 solve.TimeSparseSystem.time_linear_eq_to_matrix(20)
- 7.23±0.3ms 2.25±0.1ms 0.31 solve.TimeSparseSystem.time_linear_eq_to_matrix(30)
Full benchmark results can be found as artifacts in GitHub Actions |
Remove inapplicable no-solution sections
Could not lex literal_block as "py".
Start Symbolic Matrix section
Note to self: Just waiting on #23802 to be merged, then will link to |
Merge master into matrix.
⎢ ⎥ | ||
⎣c⋅e d ⎦ | ||
>>> b = Matrix([2, 0]) | ||
>>> A.LUsolve(b) |
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.
Have you introduced this above? Probably should explain the difference in .solve()
somewhere before.
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.
Per your other comment about LUsolve
, I now introduce LUsolve
earlier.
Probably should explain the difference in
.solve()
somewhere before.
I added a section Methods for Solving Matrix Equations, noting that Gauss-Jordan elimination is the default method, and another method is LU decomposition (via solve
with method='LU'
, or LUsolve
).
I think my earlier query to you, which method is best for a given kind of matrix (hermitian, symmetric, or triangular), will address this question?
that inverse can be much slower than LUsolve
with the same number of unknowns as equations. If not, SymPy will give the error | ||
``ShapeError: `self` and `rhs` must have the same number of rows.`` | ||
|
||
The exception to the requirement that a matrix be square comes from SymPy's use |
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.
@moorepants If there's a concise explanation of what circumstances the Moore-Penrose pseudoinverse allows for a non-square matrix under, I would appreciate you sharing it. (That's beyond my math knowledge.) Thanks!
- If matrix elements are zero, ensure that they are recognized as zero. You can | ||
do this by either making them zero or by applying | ||
[assumptions](assumptions_module). | ||
- Selecting a solve method suited to the properties of the matrix, for example |
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.
@moorepants Are there specific solving functions, or flags for solving functions, that we should recommend to users who have those kinds of matrix (hermitian, symmetric, triangular, etc.)?
Add section Methods for Solving Matrix Equations
References to other Issues or PRs
Brief description of what is fixed or changed
Other comments
Release Notes