-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Better support for symbolic ranges #21932
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. |
b763e68
to
0d4208d
Compare
I understand this is by convention, but not really obvious anyway (and a bit annoying here):
|
New docs explaining this: |
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] [b4c1da60]
<sympy-1.8^0>
- 913±4ms 125±0.8ms 0.14 dsolve.TimeDsolve01.time_dsolve
- 7.71±0.03s 4.01±0.01s 0.52 integrate.TimeIntegrationRisch02.time_doit(100)
- 7.75±0.01s 4.02±0.01s 0.52 integrate.TimeIntegrationRisch02.time_doit_risch(100)
- 65.9±0.9μs 25.4±0.3μs 0.39 matrices.TimeDiagonalEigenvals.time_eigenvals
- 78.1±2μs 51.0±0.8μs 0.65 matrices.TimeMatrixGetItem.time_ImmutableDenseMatrix_getitem
- 80.5±0.7μs 51.4±0.8μs 0.64 matrices.TimeMatrixGetItem.time_ImmutableSparseMatrix_getitem
- 79.1±0.5μs 51.0±0.5μs 0.64 matrices.TimeMatrixGetItem.time_MutableSparseMatrix_getitem
+ 76.8±1μs 123±1μs 1.60 solve.TimeMatrixArithmetic.time_dense_add(10, 5)
+ 10.4±0.07μs 17.0±0.2μs 1.63 solve.TimeMatrixArithmetic.time_dense_add(3, 0)
+ 12.3±0.2μs 27.3±0.5μs 2.22 solve.TimeMatrixArithmetic.time_dense_add(3, 5)
+ 18.1±0.3μs 34.8±1μs 1.92 solve.TimeMatrixArithmetic.time_dense_add(4, 5)
+ 33.0±0.3μs 57.6±0.8μs 1.75 solve.TimeMatrixArithmetic.time_dense_add(6, 5)
- 1.10±0.01ms 226±3μs 0.21 solve.TimeMatrixArithmetic.time_dense_multiply(10, 0)
- 40.9±0.5μs 22.3±0.4μs 0.54 solve.TimeMatrixArithmetic.time_dense_multiply(3, 0)
+ 64.7±0.3μs 117±2μs 1.80 solve.TimeMatrixArithmetic.time_dense_multiply(3, 5)
- 88.1±1μs 29.5±0.3μs 0.33 solve.TimeMatrixArithmetic.time_dense_multiply(4, 0)
- 263±2μs 63.9±0.3μs 0.24 solve.TimeMatrixArithmetic.time_dense_multiply(6, 0)
- 82.5±0.3μs 37.4±0.3μs 0.45 solve.TimeMatrixOperations.time_det(3, 0)
- 154±0.4μs 89.5±0.5μs 0.58 solve.TimeMatrixOperations.time_det(3, 2)
- 143±3μs 80.2±0.5μs 0.56 solve.TimeMatrixOperations.time_det(3, 5)
- 82.8±0.7μs 37.8±0.8μs 0.46 solve.TimeMatrixOperations.time_det_bareiss(3, 0)
- 154±1μs 91.5±1μs 0.59 solve.TimeMatrixOperations.time_det_bareiss(3, 2)
- 144±2μs 82.5±0.7μs 0.57 solve.TimeMatrixOperations.time_det_bareiss(3, 5)
- 82.6±1μs 37.5±0.3μs 0.45 solve.TimeMatrixOperations.time_det_berkowitz(3, 0)
- 153±2μs 89.6±0.9μs 0.58 solve.TimeMatrixOperations.time_det_berkowitz(3, 2)
- 145±1μs 80.3±0.7μs 0.55 solve.TimeMatrixOperations.time_det_berkowitz(3, 5)
+ 684±5μs 1.09±0.01ms 1.59 solve.TimeMatrixOperations.time_det_berkowitz(4, 0)
+ 856±10μs 1.55±0.02ms 1.81 solve.TimeMatrixOperations.time_det_berkowitz(4, 2)
+ 883±10μs 1.65±0.02ms 1.86 solve.TimeMatrixOperations.time_det_berkowitz(4, 5)
+ 250±8μs 412±3μs 1.64 solve.TimeMatrixOperations.time_rank(3, 0)
+ 390±7μs 619±9μs 1.59 solve.TimeMatrixOperations.time_rank(4, 0)
+ 113±2μs 172±2μs 1.52 solve.TimeMatrixOperations.time_rref(3, 0)
- 4.51±0.1ms 2.76±0.08ms 0.61 solve.TimeRationalSystem.time_linsolve(10)
+ 908±8μs 1.36±0.02ms 1.50 solve.TimeSparseSystem.time_linear_eq_to_matrix(10)
Full benchmark results can be found as artifacts in GitHub Actions |
Thanks! Forgot about those extended ones... |
8fb28a7
to
102dab5
Compare
102dab5
to
b54c0ad
Compare
One may want to consider a |
assert Range(n)[0] == 0 | ||
assert Range(n, n+1)[0] == n | ||
assert Range(n).size == n | ||
assert Range(n, n+1).size == 1 |
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.
nice progression of tests!
lgtm |
References to other Issues or PRs
Closes #18400
Brief description of what is fixed or changed
I started playing around with symbolic ranges and this seems to pass all the tests I ran at home.
If this seems like a way forward, I will add tests for #18400. (And try to fix any failing test...)
Other comments
Release Notes
Range
.