-
-
Notifications
You must be signed in to change notification settings - Fork 630
introduce limit(expr, v, a) syntax #38780
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
base: develop
Are you sure you want to change the base?
Conversation
small incompatibility:
used to work (because I guess |
To anyone who has inspiration: Please finish this ticket. I just made this as a place holder and am not particularly interested in pushing this feature to completion. |
Documentation preview for this PR (built with commit cda5d2a; changes) is ready! 🎉 |
Related issue: #38761. |
hi, I would like to work on this issue. |
@EigenVector22 good luck! Since it looks like you're a new contributor, here a few useful links:
and the standards we expect a PR to meet before getting merged as well as our review process are explained here: https://doc.sagemath.org/html/en/developer/review.html |
sagemathgh-39812: Adds limit(expr, v, a) syntax Implemented the limit(expr, variable, value) positional syntax to allow limits with respect to indexed variables or other variables not usable as keyword arguments. Also, Updated the documentation and added doctests for the new syntax and associated error handling. Ensuring code coverage for the new argument parsing. Fixes sagemath#38761 by allowing limits to be taken with respect to indexed variables like x[0] or other symbolic expressions not usable as keyword arguments. While testing, the tests passed except the optional fricas ones that were failing before too. <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies Got the idea and direction of fixing the issue and the link to the relevant conversations in the given PR: sagemath#38780 <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39812 Reported by: Ashutosh Rajora Reviewer(s): Ashutosh Rajora, Dima Pasechnik, nbruin, Vincent Macri
sagemathgh-39812: Adds limit(expr, v, a) syntax Implemented the limit(expr, variable, value) positional syntax to allow limits with respect to indexed variables or other variables not usable as keyword arguments. Also, Updated the documentation and added doctests for the new syntax and associated error handling. Ensuring code coverage for the new argument parsing. Fixes sagemath#38761 by allowing limits to be taken with respect to indexed variables like x[0] or other symbolic expressions not usable as keyword arguments. While testing, the tests passed except the optional fricas ones that were failing before too. <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies Got the idea and direction of fixing the issue and the link to the relevant conversations in the given PR: sagemath#38780 <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39812 Reported by: Ashutosh Rajora Reviewer(s): Ashutosh Rajora, Dima Pasechnik, nbruin, Vincent Macri
following up on discussion https://groups.google.com/g/sage-support/c/o3r9bObqz3s, we introduce the notation
here to get a more direct interface with the internals. The current syntax only accepts
limit(expr, v=a)
which is cute, but it requires the variable to be denoted by a string. This can be problematic when, for instance, you want to take a limit with respect toX[0]
whereX=var('x',n=3)
, in which case the string description of the variable is not directly available.📝 Checklist
⌛ Dependencies