-
-
Notifications
You must be signed in to change notification settings - Fork 510
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
Fix monomial_coefficients
for submodules of free modules from sage.modules
#37526
Fix monomial_coefficients
for submodules of free modules from sage.modules
#37526
Conversation
b6ff351
to
90d480e
Compare
27f5eb1
to
80db45d
Compare
Documentation preview for this PR (built with commit 2eb5de8; changes) is ready! 🎉 |
80db45d
to
629c569
Compare
629c569
to
a3dfe7b
Compare
a3dfe7b
to
1f69514
Compare
…ients): Fix for submodules
…ng workaround, delegate to .element()
…nomial_coefficients to raise NotImplementedError
…ients): Use dict only when coordinate ring matches
cbedff2
to
f719592
Compare
base_ring = self.parent().base_ring() | ||
if self.parent().is_ambient() and base_ring == self.parent().coordinate_ring(): | ||
return self.dict(copy=copy) | ||
else: |
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 find else:
statements like this unnecessary and just adding extra (unnecessary) indentation.
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 agree, done in 2eb5de8
…ot is Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
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.
Okay, LGTM.
Thank you! |
…modules from sage.modules <!-- ^ 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". --> - Rebased version of sagemath#34455 - Part of sagemath#30309 Fixes sagemath#34455 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- 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#37526 Reported by: Matthias Köppe Reviewer(s): Matthias Köppe, Travis Scrimshaw
…modules from sage.modules <!-- ^ 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". --> - Rebased version of sagemath#34455 - Part of sagemath#30309 Fixes sagemath#34455 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- 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#37526 Reported by: Matthias Köppe Reviewer(s): Matthias Köppe, Travis Scrimshaw
Fixes #34455
📝 Checklist
⌛ Dependencies