-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
allow rhs in rref #25687
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
allow rhs in rref #25687
Conversation
✅ Hi, I am the SymPy bot. 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.13. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
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) | Change | Before [8059df73] <sympy-1.12^0> | After [781442f7] | Ratio | Benchmark (Parameter) |
|----------|------------------------------------|---------------------|---------|----------------------------------------------------------------------|
| - | 85.6±1ms | 56.9±0.2ms | 0.67 | integrate.TimeIntegrationRisch02.time_doit(10) |
| - | 85.8±1ms | 55.7±0.2ms | 0.65 | integrate.TimeIntegrationRisch02.time_doit_risch(10) |
| + | 22.6±0.07μs | 39.0±0.09μs | 1.73 | integrate.TimeIntegrationRisch03.time_doit(1) |
| - | 6.97±0.01ms | 3.74±0.01ms | 0.54 | logic.LogicSuite.time_load_file |
| - | 4.25±1ms | 2.25±0ms | 0.53 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(2, 'dense') |
| - | 2.11±0.01ms | 660±2μs | 0.31 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(3, 'sparse') |
| - | 10.3±0.02ms | 1.96±0.01ms | 0.19 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(5, 'sparse') |
| - | 367±0.8μs | 81.9±0.1μs | 0.22 | polys.TimePREM_QuadraticNonMonicGCD.time_op(1, 'sparse') |
| - | 4.84±0.01ms | 364±0.8μs | 0.08 | polys.TimePREM_QuadraticNonMonicGCD.time_op(3, 'sparse') |
| - | 10.6±0.02ms | 1.10±0ms | 0.1 | polys.TimePREM_QuadraticNonMonicGCD.time_op(5, 'sparse') |
| - | 6.23±0.02ms | 3.95±0.01ms | 0.63 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(2, 'sparse') |
| - | 27.1±0.05ms | 12.1±0.02ms | 0.44 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(3, 'sparse') |
| - | 6.95±0.02ms | 1.18±0ms | 0.17 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(1, 'sparse') |
| - | 16.2±0.02ms | 9.22±0.02ms | 0.57 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(2, 'sparse') |
| - | 211±0.3ms | 70.7±0.2ms | 0.33 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(3, 'sparse') |
| - | 6.38±0.01ms | 535±1μs | 0.08 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(3, 'sparse') |
| - | 27.7±0.05ms | 857±2μs | 0.03 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(5, 'sparse') |
| - | 613±2μs | 199±1μs | 0.32 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(1, 'sparse') |
| - | 6.48±0.01ms | 201±0.9μs | 0.03 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(3, 'sparse') |
| - | 17.1±0.04ms | 205±0.9μs | 0.01 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(5, 'sparse') |
| - | 164±0.1μs | 89.0±0.2μs | 0.54 | solve.TimeMatrixOperations.time_rref(3, 0) |
| - | 316±0.4μs | 107±0.7μs | 0.34 | solve.TimeMatrixOperations.time_rref(4, 0) |
| - | 31.6±0.06ms | 13.5±0.03ms | 0.43 | solve.TimeSolveLinSys189x49.time_solve_lin_sys |
Full benchmark results can be found as artifacts in GitHub Actions |
What about having a separate function like |
I wanted to vote about the idea to have separate function, especially if the structure of return is dependent on some parameters. |
Thanks for SymPy developers for looking into this! I haven't actually tested the PR, but do have the following questions/comments :
|
Yes, this case is handled and the rank calculation is omitted. @sylee957 pointed out that simply satcking a full identity matrix is a more robust aproach. |
rhs : Matrix | ||
If ``rhs`` is passed it must have the same number of rows as ``M``. | ||
Reduction steps will not take place in this matrix, but | ||
the elements will be included in the reduction steps. If a single | ||
column matrix of symbols is passed, the expressions in each | ||
row at the end of the reduction will indicate how rows were | ||
combined to perform the reduction. |
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.
Unfortunately, I missed this point that this should move to the documentation in rref_rhs
. This option should not be carried by rref.__doc__ = _rref.__doc__
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 will make new pr. Sorry I missed that.
Thanks everyone! |
References to other Issues or PRs
#25661 related
Brief description of what is fixed or changed
Other comments
see issue page and the questions I raise there
Release Notes
A.rref_rhs(b)
will return rref of A and resulting form of b without reducing b; pivots are returned as 3rd arg