Skip to content

Commit f186664

Browse files
author
Release Manager
committed
gh-35945: `sage.categories`: Update `# needs` <!-- ^^^^^ 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 #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> - Part of: #29705 - Cherry-picked from: #35095 <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #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. - [x] The description explains in detail what this PR is about. - [x] 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: #35945 Reported by: Matthias Köppe Reviewer(s): David Coudert, Matthias Köppe
2 parents e6a0d13 + f29be5a commit f186664

File tree

144 files changed

+5918
-5322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+5918
-5322
lines changed

src/sage/categories/action.pyx

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -333,28 +333,30 @@ cdef class InverseAction(Action):
333333
334334
EXAMPLES::
335335
336-
sage: V = QQ^3 # optional - sage.modules
337-
sage: v = V((1, 2, 3)) # optional - sage.modules
336+
sage: V = QQ^3 # needs sage.modules
337+
sage: v = V((1, 2, 3)) # needs sage.modules
338338
sage: cm = get_coercion_model()
339339
340-
sage: a = cm.get_action(V, QQ, operator.mul) # optional - sage.modules
341-
sage: a # optional - sage.modules
340+
sage: # needs sage.modules
341+
sage: a = cm.get_action(V, QQ, operator.mul)
342+
sage: a
342343
Right scalar multiplication by Rational Field
343344
on Vector space of dimension 3 over Rational Field
344-
sage: ~a # optional - sage.modules
345+
sage: ~a
345346
Right inverse action by Rational Field
346347
on Vector space of dimension 3 over Rational Field
347-
sage: (~a)(v, 1/3) # optional - sage.modules
348+
sage: (~a)(v, 1/3)
348349
(3, 6, 9)
349350
350-
sage: b = cm.get_action(QQ, V, operator.mul) # optional - sage.modules
351-
sage: b # optional - sage.modules
351+
sage: # needs sage.modules
352+
sage: b = cm.get_action(QQ, V, operator.mul)
353+
sage: b
352354
Left scalar multiplication by Rational Field
353355
on Vector space of dimension 3 over Rational Field
354-
sage: ~b # optional - sage.modules
356+
sage: ~b
355357
Left inverse action by Rational Field
356358
on Vector space of dimension 3 over Rational Field
357-
sage: (~b)(1/3, v) # optional - sage.modules
359+
sage: (~b)(1/3, v)
358360
(3, 6, 9)
359361
360362
sage: c = cm.get_action(ZZ, list, operator.mul)
@@ -398,11 +400,12 @@ cdef class InverseAction(Action):
398400
399401
Check that this action can be pickled (:trac:`29031`)::
400402
401-
sage: V = QQ^3 # optional - sage.modules
402-
sage: v = V((1, 2, 3)) # optional - sage.modules
403-
sage: cm = get_coercion_model() # optional - sage.modules
404-
sage: a = cm.get_action(V, QQ, operator.mul) # optional - sage.modules
405-
sage: loads(dumps(~a)) is not None # optional - sage.modules
403+
sage: # needs sage.modules
404+
sage: V = QQ^3
405+
sage: v = V((1, 2, 3))
406+
sage: cm = get_coercion_model()
407+
sage: a = cm.get_action(V, QQ, operator.mul)
408+
sage: loads(dumps(~a)) is not None
406409
True
407410
"""
408411
return (type(self), (self._action,))
@@ -432,16 +435,17 @@ cdef class PrecomposedAction(Action):
432435
We demonstrate that an example discussed on :trac:`14711` did not become a
433436
problem::
434437
435-
sage: E = ModularSymbols(11).2 # optional - sage.modular
436-
sage: s = E.modular_symbol_rep() # optional - sage.modular
437-
sage: del E,s # optional - sage.modular
438-
sage: import gc # optional - sage.modular
439-
sage: _ = gc.collect() # optional - sage.modular
440-
sage: E = ModularSymbols(11).2 # optional - sage.modular
441-
sage: v = E.manin_symbol_rep() # optional - sage.modular
442-
sage: c,x = v[0] # optional - sage.modular
443-
sage: y = x.modular_symbol_rep() # optional - sage.modular
444-
sage: coercion_model.get_action(QQ, parent(y), op=operator.mul) # optional - sage.modular
438+
sage: # needs sage.modular
439+
sage: E = ModularSymbols(11).2
440+
sage: s = E.modular_symbol_rep()
441+
sage: del E,s
442+
sage: import gc
443+
sage: _ = gc.collect()
444+
sage: E = ModularSymbols(11).2
445+
sage: v = E.manin_symbol_rep()
446+
sage: c,x = v[0]
447+
sage: y = x.modular_symbol_rep()
448+
sage: coercion_model.get_action(QQ, parent(y), op=operator.mul)
445449
Left scalar multiplication by Rational Field
446450
on Abelian Group of all Formal Finite Sums over Rational Field
447451
with precomposition on right by Coercion map:
@@ -483,12 +487,13 @@ cdef class PrecomposedAction(Action):
483487
484488
Check that this action can be pickled (:trac:`29031`)::
485489
486-
sage: E = ModularSymbols(11).2 # optional - sage.modular
487-
sage: v = E.manin_symbol_rep() # optional - sage.modular
488-
sage: c,x = v[0] # optional - sage.modular
489-
sage: y = x.modular_symbol_rep() # optional - sage.modular
490-
sage: act = coercion_model.get_action(QQ, parent(y), op=operator.mul) # optional - sage.modular
491-
sage: loads(dumps(act)) is not None # optional - sage.modular
490+
sage: # needs sage.modular
491+
sage: E = ModularSymbols(11).2
492+
sage: v = E.manin_symbol_rep()
493+
sage: c,x = v[0]
494+
sage: y = x.modular_symbol_rep()
495+
sage: act = coercion_model.get_action(QQ, parent(y), op=operator.mul)
496+
sage: loads(dumps(act)) is not None
492497
True
493498
"""
494499
return (type(self), (self._action, self.G_precomposition, self.S_precomposition))

0 commit comments

Comments
 (0)