sagemath/sage

Modularization changes in sage.modules, sage.matrix

Closed this issue · 16 comments

cherry-picked from #32432

Depends on #32637
Depends on #32665

CC: @kliem

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 8679256

Reviewer: Jonathan Kliem

Issue created by migration from https://trac.sagemath.org/ticket/32725

Commit: 69e8968

Description changed:

--- 
+++ 
@@ -1 +1 @@
-
+cherry-picked from #32432

Dependencies: #32637, #32665

Last 10 new commits:

50c5f58src/sage/matrix/args.pyx: Move import of RDF, CDF into method
d081814src/sage/matrix/matrix_misc.py: Move import of PolynomialRing into method
561bad4sage.modules, sage.matrix: Use sage.rings.abc more
e072aa1sage.structure, sage.rings, sage.matrix: Use sage.rings.abc for IntegerModRing
b349740src/sage/modules/free_module.py: Use sage.rings.abc.Order
f2f00e5src/sage/matrix/matrix_space.py: More try..except for imports
40f01d5src/sage/modules/free_module.py: More try..except for imports
65a5ce3src/sage/modules/free_module_element.pyx: Do not fail if numpy cannot be imported
b325232Matrix.gram_schmidt: Use sage.rings.abc
69e8968Matrix.gram_schmidt: Use sage.rings.abc (fixup)

Author: Matthias Koeppe

comment:3

I don't think the doctest failure in src/sage/rings/integer.pyx is coming from this ticket

kliem commented

Reviewer: Jonathan Kliem

kliem commented
comment:5
  • There is a missing empty-line before this one.
+    if is_sparse:
+        return free_module_element.FreeModuleElement_generic_sparse

It is really different from the above, as it also catches some of the above cases, where an import failed.

  • If you are touching this line, you might as well fix it (Returns -> Return):
+    Returns True if ``R`` is the symbolic expression ring.

Once done, you can put it on positive review on my behalf.

Changed commit from 69e8968 to b85aaa4

Branch pushed to git repo; I updated commit sha1. New commits:

810e3e6src/sage/modules/free_module.py: Separate long if/elif chain from the following code by a newline
b85aaa4src/sage/symbolic/ring.pyx: Returns -> Return in docstring
comment:7

Thanks for reviewing!

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

8679256Merge tag '9.5.beta5' into t/32725/modularization_changes_in_sage_modules__sage_matrix

Changed commit from b85aaa4 to 8679256

comment:9

Merged new beta.