-
-
Notifications
You must be signed in to change notification settings - Fork 608
Raise a power series to a power series #36773
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? < 8000 a data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"new issue modal","repository_id":null,"auth_type":"LOG_IN","originating_url":"https://github.com/sagemath/sage/pull/36773","user_id":null}}" data-hydro-click-hmac="34ba475a6f8e5f57d5d433f21d47267b74f570f412e276497027a5205d9c0e20" class="Link--inTextBlock" href="/login?return_to=%2Fsagemath%2Fsage%2Fissues%2Fnew%2Fchoose">Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit cd6d553; changes) is ready! 🎉 |
As I understand it, the lint issues are coming from other portions of the code than what I changed. |
right = QQ.coerce(r) | ||
except TypeError: | ||
raise ValueError("exponent must be a rational number") | ||
if parent(r) is self.parent() or QQ.has_coerce_map_from(parent(r)): |
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 think it would be good to split things up into cases with a bit more care. I would first test if r
can be coerced into QQ
and then run that case. Then if that is not the case, check if r
can be coerced into self.parent()
and if so then do the QQ
might also coerce into self.parent()
(which I expect the general case to be slower). In both cases, I would probably do it by try
-except
blocks.
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 think is a good solution to manage all the cases
The lint issues are related to some trailing spaces in your code |
This adds the functionality to compute the power series
f^g
when it is well defined.This adds functionality that is useful for generating function computations.
Fixes #36772.
📝 Checklist
⌛ Dependencies
N/A