Skip to content

Commit 68b15c8

Browse files
author
Release Manager
committed
gh-36905: `src/sage/{categories,coding,plot,quadratic_forms}/`: Fix various doctest warnings We fix the following warnings ``` File "src/sage/categories/finite_complex_reflection_groups.py", line 558, in sage.categories.finite_complex_reflection_groups.FiniteComplexRe flectionGroups.ParentMethods.milnor_fiber_poset Warning: Consider using a block-scoped tag by inserting the line 'sage: # optional - gap3' just before this line to avoid repeating the tag 4 times W = ReflectionGroup(4) # optional - gap3 ********************************************************************** File "src/sage/categories/finite_complex_reflection_groups.py", line 565, in sage.categories.finite_complex_reflection_groups.FiniteComplexRe flectionGroups.ParentMethods.milnor_fiber_poset Warning: Consider using a block-scoped tag by inserting the line 'sage: # optional - gap3' just before this line to avoid repeating the tag 6 times W = ReflectionGroup([4,2,2]) # optional - gap3 File "src/sage/coding/ag_code_decoders.pyx", line 32, in sage.coding.ag_code_decoders Warning: Consider using a block-scoped tag by inserting the line 'sage: # long time' just before this line to avoid repeating the tag 9 times channel = channels.StaticErrorRateChannel(code.ambient_space(), tau) # long time File "src/sage/plot/graphics.py", line 1819, in sage.plot.graphics.Graphics.show Warning: Variable 'G' referenced here was set only in doctest marked '# needs sage.symbolic'; '# long time, needs sage.symbolic' G.show(scale='semilogy') # long time File "src/sage/quadratic_forms/ternary_qf.py", line 924, in sage.quadratic_forms.ternary_qf.TernaryQF.find_p_neighbor_from_vec Warning: Variable 'Q' referenced here was set only in doctest marked '# needs sage.libs.pari' Q.find_p_neighbor_from_vec(3, (0,0,1)) [315 tests, 0.38 s] ``` ### 📝 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. - [x] 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 - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36905 Reported by: David Coudert Reviewer(s): Matthias Köppe
2 parents a1db8a4 + 680c996 commit 68b15c8

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed

src/sage/categories/finite_complex_reflection_groups.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -555,22 +555,22 @@ def milnor_fiber_poset(self):
555555
sage: sum(x**P.rank(elt) for elt in P)
556556
18*x^2 + 15*x + 1
557557
558-
sage: W = ReflectionGroup(4) # optional - gap3
559-
sage: P = W.milnor_fiber_poset() # optional - gap3
560-
sage: P # optional - gap3
558+
sage: # optional - gap3
559+
sage: W = ReflectionGroup(4)
560+
sage: P = W.milnor_fiber_poset(); P
561561
Finite meet-semilattice containing 41 elements
562-
sage: sum(x**P.rank(elt) for elt in P) # optional - gap3
562+
sage: sum(x**P.rank(elt) for elt in P)
563563
24*x^2 + 16*x + 1
564564
565-
sage: W = ReflectionGroup([4,2,2]) # optional - gap3
566-
sage: W.is_well_generated() # optional - gap3
565+
sage: # optional - gap3
566+
sage: W = ReflectionGroup([4,2,2])
567+
sage: W.is_well_generated()
567568
False
568-
sage: P = W.milnor_fiber_poset() # optional - gap3
569-
sage: P # optional - gap3
569+
sage: P = W.milnor_fiber_poset(); P
570570
Finite poset containing 47 elements
571-
sage: sum(x**P.rank(elt) for elt in P) # optional - gap3
571+
sage: sum(x**P.rank(elt) for elt in P)
572572
16*x^3 + 24*x^2 + 6*x + 1
573-
sage: P.is_meet_semilattice() # optional - gap3
573+
sage: P.is_meet_semilattice()
574574
False
575575
"""
576576
I = self.index_set()

src/sage/coding/ag_code_decoders.pyx

+10-9
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,18 @@ EXAMPLES::
2929
The ``decoder`` is now ready for correcting vectors received from a noisy
3030
channel::
3131
32-
sage: channel = channels.StaticErrorRateChannel(code.ambient_space(), tau) # long time
33-
sage: message_space = decoder.message_space() # long time
34-
sage: message = message_space.random_element() # long time
35-
sage: encoder = decoder.connected_encoder() # long time
36-
sage: sent_codeword = encoder.encode(message) # long time
37-
sage: received_vector = channel(sent_codeword) # long time
38-
sage: (received_vector - sent_codeword).hamming_weight() # long time
32+
sage: # long time
33+
sage: channel = channels.StaticErrorRateChannel(code.ambient_space(), tau)
34+
sage: message_space = decoder.message_space()
35+
sage: message = message_space.random_element()
36+
sage: encoder = decoder.connected_encoder()
37+
sage: sent_codeword = encoder.encode(message)
38+
sage: received_vector = channel(sent_codeword)
39+
sage: (received_vector - sent_codeword).hamming_weight()
3940
4
40-
sage: decoder.decode_to_code(received_vector) == sent_codeword # long time
41+
sage: decoder.decode_to_code(received_vector) == sent_codeword
4142
True
42-
sage: decoder.decode_to_message(received_vector) == message # long time
43+
sage: decoder.decode_to_message(received_vector) == message
4344
True
4445
4546
AUTHORS:

src/sage/plot/graphics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ def show(self, **kwds):
18161816
some examples.::
18171817
18181818
sage: G = list_plot([10**i for i in range(10)]) # long time, needs sage.symbolic
1819-
sage: G.show(scale='semilogy') # long time
1819+
sage: G.show(scale='semilogy') # long time, needs sage.symbolic
18201820
18211821
::
18221822

src/sage/quadratic_forms/ternary_qf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ def find_p_neighbor_from_vec(self, p, v, mat=False):
921921
922922
Test that it works with (0, 0, 1)::
923923
924-
sage: Q.find_p_neighbor_from_vec(3, (0,0,1))
924+
sage: Q.find_p_neighbor_from_vec(3, (0,0,1)) # needs sage.libs.pari
925925
Ternary quadratic form with integer coefficients:
926926
[1 3 3]
927927
[-2 0 -1]

0 commit comments

Comments
 (0)