Skip to content

Commit

Permalink
sagemathgh-36905: `src/sage/{categories,coding,plot,quadratic_forms}/…
Browse files Browse the repository at this point in the history
…`: 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
- 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#36905
Reported by: David Coudert
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Dec 22, 2023
2 parents bde7dc6 + 680c996 commit 8c1b855
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
20 changes: 10 additions & 10 deletions src/sage/categories/finite_complex_reflection_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,22 +555,22 @@ def milnor_fiber_poset(self):
sage: sum(x**P.rank(elt) for elt in P)
18*x^2 + 15*x + 1
sage: W = ReflectionGroup(4) # optional - gap3
sage: P = W.milnor_fiber_poset() # optional - gap3
sage: P # optional - gap3
sage: # optional - gap3
sage: W = ReflectionGroup(4)
sage: P = W.milnor_fiber_poset(); P
Finite meet-semilattice containing 41 elements
sage: sum(x**P.rank(elt) for elt in P) # optional - gap3
sage: sum(x**P.rank(elt) for elt in P)
24*x^2 + 16*x + 1
sage: W = ReflectionGroup([4,2,2]) # optional - gap3
sage: W.is_well_generated() # optional - gap3
sage: # optional - gap3
sage: W = ReflectionGroup([4,2,2])
sage: W.is_well_generated()
False
sage: P = W.milnor_fiber_poset() # optional - gap3
sage: P # optional - gap3
sage: P = W.milnor_fiber_poset(); P
Finite poset containing 47 elements
sage: sum(x**P.rank(elt) for elt in P) # optional - gap3
sage: sum(x**P.rank(elt) for elt in P)
16*x^3 + 24*x^2 + 6*x + 1
sage: P.is_meet_semilattice() # optional - gap3
sage: P.is_meet_semilattice()
False
"""
I = self.index_set()
Expand Down
19 changes: 10 additions & 9 deletions src/sage/coding/ag_code_decoders.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ EXAMPLES::
The ``decoder`` is now ready for correcting vectors received from a noisy
channel::
sage: channel = channels.StaticErrorRateChannel(code.ambient_space(), tau) # long time
sage: message_space = decoder.message_space() # long time
sage: message = message_space.random_element() # long time
sage: encoder = decoder.connected_encoder() # long time
sage: sent_codeword = encoder.encode(message) # long time
sage: received_vector = channel(sent_codeword) # long time
sage: (received_vector - sent_codeword).hamming_weight() # long time
sage: # long time
sage: channel = channels.StaticErrorRateChannel(code.ambient_space(), tau)
sage: message_space = decoder.message_space()
sage: message = message_space.random_element()
sage: encoder = decoder.connected_encoder()
sage: sent_codeword = encoder.encode(message)
sage: received_vector = channel(sent_codeword)
sage: (received_vector - sent_codeword).hamming_weight()
4
sage: decoder.decode_to_code(received_vector) == sent_codeword # long time
sage: decoder.decode_to_code(received_vector) == sent_codeword
True
sage: decoder.decode_to_message(received_vector) == message # long time
sage: decoder.decode_to_message(received_vector) == message
True
AUTHORS:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/plot/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,7 @@ def show(self, **kwds):
some examples.::
sage: G = list_plot([10**i for i in range(10)]) # long time, needs sage.symbolic
sage: G.show(scale='semilogy') # long time
sage: G.show(scale='semilogy') # long time, needs sage.symbolic
::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/quadratic_forms/ternary_qf.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def find_p_neighbor_from_vec(self, p, v, mat=False):
Test that it works with (0, 0, 1)::
sage: Q.find_p_neighbor_from_vec(3, (0,0,1))
sage: Q.find_p_neighbor_from_vec(3, (0,0,1)) # needs sage.libs.pari
Ternary quadratic form with integer coefficients:
[1 3 3]
[-2 0 -1]
Expand Down

0 comments on commit 8c1b855

Please sign in to comment.