Opened 5 years ago
Last modified 5 years ago
#23338 closed enhancement
Clean up polynomial constructor — at Version 12
Reported by: | jdemeyer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.0 |
Component: | algebra | Keywords: | |
Cc: | tscrim | Merged in: | |
Authors: | Jeroen Demeyer | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | u/jdemeyer/clean_up_polynomial_constructor (Commits, GitHub, GitLab) | Commit: | f0a314c800e0f060008a9402d1a7f2fba968920b |
Dependencies: | Stopgaps: |
Description (last modified by )
This ticket cleans up the PolynomialRing()
function in many ways. Mainly:
- Use
normalize_names()
as much as possible to deal with variable names.
- Fix indentation in docstring.
- Pass arguments like
sparse
andimplementation
as**kwds
to the single-variate or multi-variate polynomial constructor.
- Make the code easier to understand.
- Allow
PolynomialRing(..., implementation="singular")
which forces Singular. This allows simplifying some code insrc/sage/algebras/free_algebra.py
which currently needs to jump through hoops to get aMPolynomialRing_libsingular
.
- Check more error conditions, for example currently we have
sage: PolynomialRing(QQ, name="x", names="y") Univariate Polynomial Ring in y over Rational Field
- Change some arguments of
PolynomialRing()
to keyword-only arguments. This does break some existing uses ofPolynomialRing()
, although much more likely in library code and not user code (some code in Sage gets this even wrong and was passingsparse="lex"
instead oforder="lex"
)
Apart from items 6 and 7, no existing functionality is changed.
Change History (12)
comment:1 Changed 5 years ago by
- Cc tscrim added
comment:2 Changed 5 years ago by
- Branch set to u/jdemeyer/clean_up_polynomial_constructor
comment:3 Changed 5 years ago by
- Commit set to 883d50709298487518d7d0a2771045483adb0cf9
First version, not finished or tested yet. But feel free to comment...
New commits:
883d507 | Clean up PolynomialRing() constructor
|
comment:4 Changed 5 years ago by
- Description modified (diff)
comment:5 Changed 5 years ago by
- Description modified (diff)
comment:6 Changed 5 years ago by
- Description modified (diff)
comment:7 Changed 5 years ago by
- Description modified (diff)
comment:8 Changed 5 years ago by
- Description modified (diff)
comment:9 Changed 5 years ago by
- Description modified (diff)
comment:10 Changed 5 years ago by
- Commit changed from 883d50709298487518d7d0a2771045483adb0cf9 to 2f8a591a6b7151c442c9d20b53a5131eaa26e3b0
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
2f8a591 | Clean up PolynomialRing() constructor
|
comment:11 Changed 5 years ago by
- Commit changed from 2f8a591a6b7151c442c9d20b53a5131eaa26e3b0 to f0a314c800e0f060008a9402d1a7f2fba968920b
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
f0a314c | Clean up PolynomialRing() constructor
|
comment:12 Changed 5 years ago by
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
+1