Skip to content

Commit

Permalink
sagemathgh-37279: Fix some doctest warnings
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
These are some of the last remaining doctest warnings as of 10.3.beta7,
as seen e.g. in https://github.com/sagemath/sage/pull/37250/files
"Unchanged files with check annotations".

The ones not fixed here will need a solution for:
- sagemath#36099

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] 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
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37279
Reported by: Matthias Köppe
Reviewer(s): David Coudert
  • Loading branch information
Release Manager committed Feb 11, 2024
2 parents 36bf4af + 9bfc29a commit f71381c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/sage/geometry/polyhedron/backend_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _is_zero(self, x):
sage: p = Polyhedron([(sqrt(3),sqrt(2))], base_ring=AA) # needs sage.rings.number_field sage.symbolic
sage: p._is_zero(0) # needs sage.rings.number_field sage.symbolic
True
sage: p._is_zero(1/100000) # needs sage.rings.number_field
sage: p._is_zero(1/100000) # needs sage.rings.number_field sage.symbolic
False
"""
return x == 0
Expand Down
12 changes: 6 additions & 6 deletions src/sage/rings/finite_rings/integer_mod_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,14 +617,14 @@ def multiplicative_subgroups(self):
EXAMPLES::
sage: # needs sage.groups
sage: Integers(5).multiplicative_subgroups() # optional - gap_package_polycyclic
sage: # optional - gap_package_polycyclic, needs sage.groups
sage: Integers(5).multiplicative_subgroups()
((2,), (4,), ())
sage: Integers(15).multiplicative_subgroups() # optional - gap_package_polycyclic
sage: Integers(15).multiplicative_subgroups()
((11, 7), (11, 4), (2,), (11,), (14,), (7,), (4,), ())
sage: Integers(2).multiplicative_subgroups() # optional - gap_package_polycyclic
sage: Integers(2).multiplicative_subgroups()
((),)
sage: len(Integers(341).multiplicative_subgroups()) # optional - gap_package_polycyclic
sage: len(Integers(341).multiplicative_subgroups())
80
TESTS::
Expand All @@ -633,7 +633,7 @@ def multiplicative_subgroups(self):
((),)
sage: IntegerModRing(2).multiplicative_subgroups() # needs sage.groups
((),)
sage: IntegerModRing(3).multiplicative_subgroups() # needs sage.groups # optional - gap_package_polycyclic
sage: IntegerModRing(3).multiplicative_subgroups() # optional - gap_package_polycyclic, needs sage.groups
((2,), ())
"""
return tuple(tuple(g.value() for g in H.gens())
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ProductTree:
Similarly, the :meth:`interpolation` method can be used to implement
the inverse Fast Fourier Transform::
sage: tree.interpolation(zs).padded_list(len(ys)) == ys
sage: tree.interpolation(zs).padded_list(len(ys)) == ys # needs sage.rings.finite_rings
True
This class encodes the tree as *layers*: Layer `0` is just a tuple
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/polynomial/polynomial_rational_flint.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2127,11 +2127,11 @@ cdef class Polynomial_rational_flint(Polynomial):
::
sage: # needs sage.libs.pari
sage: # needs sage.groups sage.libs.pari
sage: f = x^4 - 17*x^3 - 2*x + 1
sage: G = f.galois_group(pari_group=True); G
PARI group [24, -1, 5, "S4"] of degree 4
sage: PermutationGroup(G) # needs sage.groups
sage: PermutationGroup(G)
Transitive group number 5 of degree 4
You can use KASH or GAP to compute Galois groups as well. The advantage is
Expand Down
1 change: 1 addition & 0 deletions src/sage/schemes/curves/affine_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,7 @@ def fundamental_group(self, simplified=True, puiseux=False):
to the algebraic field::
sage: # needs sage.rings.number_field
sage: x = polygen(ZZ)
sage: a = QQ[x](x^2 + 5).roots(QQbar)[0][0]
sage: F = NumberField(a.minpoly(), 'a', embedding=a)
sage: F.inject_variables()
Expand Down

0 comments on commit f71381c

Please sign in to comment.