Opened 3 years ago
Last modified 3 years ago
#20454 new defect
conversion from SR[] to SR
Reported by: | rws | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.2 |
Component: | symbolics | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Even if there are identical generator and variable names there should not be a problem to convert from a univariate polynomial with symbolic coefficients to a symbolic expression, but:
sage: S.<y> = PolynomialRing(SR) sage: p = y^2 + pi*y + 1 sage: p.coefficients() [1, pi, 1] sage: ex = SR(p) ... TypeError: not a constant polynomial
Change History (2)
comment:1 Changed 3 years ago by
comment:2 Changed 3 years ago by
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
You can get a morphism that does this:
I think we'll get more mileage out of educating users how to define the morphisms they need than trying to stuff every possible operation into conversion (although the one you propose here wouldn't necessarily be a problem by itself. You'll just have that
S(SR(p)) != p
, which will be a little surprising (and the fact thatS(..)
maps elements ofSR
to constants will be very hard to change, or at least cause big problems down the line if you do)