Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
97894ff
src/sage/matrix/special.py: Do not fail if numpy cannot be imported
mkoeppe Oct 27, 2021
9da00c5
src/sage/modules/free_module_integer.py: Do not fail if OrderElement_…
mkoeppe Feb 23, 2022
514994a
src/sage/matrix/special.py: Mark doctests # optional - sage.symbolic
mkoeppe Feb 17, 2023
047b269
sage.matrix: More # optional
mkoeppe Feb 26, 2023
7c3fdba
sage.modules: More # optional
mkoeppe Feb 26, 2023
7dcc84f
sage.modules, sage.matrix: More # optional
mkoeppe Feb 26, 2023
8cb27b7
sage.modules, sage.matrix: Fix up # optional
mkoeppe Feb 26, 2023
d596f30
src/sage/matrix/matrix_space.py: More try...import...except
mkoeppe Feb 26, 2023
25a7b44
src/sage/matrix/matrix2.pyx: More # optional
mkoeppe Feb 26, 2023
9e6aa04
src/sage/matrix/matrix_polynomial_dense.pyx: Fix reformatted doctest
mkoeppe Feb 27, 2023
baa492e
sage.matrix, sage.modules: Add # optional - numpy, fpylll, etc.
mkoeppe Mar 6, 2023
77f0699
Add # optional - numpy etc.
mkoeppe Mar 6, 2023
acab7e5
In # optional, no commas between tags
mkoeppe Mar 8, 2023
9e02b45
sage.matrix: Add # optional
mkoeppe Mar 9, 2023
7f20bb7
sage.matrix, sage.modules: Add # optional
mkoeppe Mar 10, 2023
b8b2c08
sage.modules: More # optional
mkoeppe Mar 11, 2023
17f94a8
sage.matrix: More # optional
mkoeppe Mar 11, 2023
7b6e851
sage.matrix, sage.modules: Move some imports into methods
mkoeppe Mar 11, 2023
092d217
sage.matrix: More # optional
mkoeppe Mar 12, 2023
86211ad
sage.tensor: Move import from sage.groups into method
mkoeppe Mar 12, 2023
1440982
sage.modules: More # optional
mkoeppe Mar 12, 2023
f758f71
src/sage/matrix/matrix2.pyx: Fix imports
mkoeppe Mar 13, 2023
7d6b71f
sage.matrix: More # optional
mkoeppe Mar 13, 2023
87c567b
sage.modules: More # optional
mkoeppe Mar 13, 2023
334c01c
sage.matrix: More # optional
mkoeppe Mar 18, 2023
58bb755
sage.{matrix,modules}: More # optional
mkoeppe Apr 25, 2023
1c4a858
sage.{geometry,matrix,modules,repl,sets}: More # optional
mkoeppe Apr 28, 2023
31795e7
More optional
mkoeppe Apr 28, 2023
c5e2266
Fix # optional
mkoeppe May 13, 2023
1acb3bb
Fix # optional
mkoeppe May 13, 2023
c247f12
sage.matrix: Add # optional
mkoeppe May 15, 2023
1fa65eb
Massive modularization fixes
mkoeppe May 17, 2023
91eaee7
More fixes
mkoeppe May 18, 2023
ac604c2
Fixups
mkoeppe May 21, 2023
9d18fb3
sage.matrix: Add # optional
mkoeppe Jun 2, 2023
18f8100
sage.modules: More # optional
mkoeppe Jun 2, 2023
3d55279
Add # optional
mkoeppe Jun 2, 2023
8f930bb
Fix # optional
mkoeppe Jun 2, 2023
a104978
sage.quadratic_forms: More # optional
mkoeppe Jun 3, 2023
c65c36f
More # optional
mkoeppe Jun 4, 2023
e1e5f60
More # optional
mkoeppe Jun 8, 2023
e10a2d9
More # optional
mkoeppe Jun 9, 2023
11f8d18
sage.probability, sage.stats: Docstring cosmetics
mkoeppe Jun 11, 2023
be8163b
src/sage/stats/hmm/hmm.pyx: Fix up import
mkoeppe Jun 11, 2023
2566945
More # optional
mkoeppe Jun 11, 2023
b1ad8cd
More # optional
mkoeppe Jun 11, 2023
b204f71
More # optional
mkoeppe Jun 13, 2023
6794d85
More # optional
mkoeppe Jun 15, 2023
412ad36
src/sage/stats/basic_stats.py: Fix rst markup
mkoeppe Jun 17, 2023
e895621
Conditionalize tests to avoid timeouts/infinite recursion in sagemath…
mkoeppe Jun 17, 2023
29dc0e8
More # optional
mkoeppe Jun 18, 2023
6331b17
src/sage/stats/basic_stats.py: Update uses of numpy.ndarray
mkoeppe Jun 18, 2023
95b62a0
More # optional
mkoeppe Jun 18, 2023
a70f77f
More # optional
mkoeppe Jun 20, 2023
e549988
More # optional
mkoeppe Jun 20, 2023
ed16bb2
src/sage/stats/basic_stats.py: Add # optional
mkoeppe Jun 25, 2023
1d2ac69
src/sage/modules/free_quadratic_module_integer_symmetric.py: Update #…
mkoeppe Jun 25, 2023
adbf73e
More # optional
mkoeppe Jun 26, 2023
9056a12
sage.modules: ./sage -fixdoctests --long --distribution 'sagemath-mod…
mkoeppe Jun 28, 2023
649a959
sage.matrix: ./sage -fixdoctests --long --distribution 'sagemath-modu…
mkoeppe Jun 28, 2023
d5f0391
Update # optional / # needs
mkoeppe Jul 1, 2023
14e7df0
Update # optional / # needs
mkoeppe Jul 2, 2023
51c0e0a
Update # optional / # needs
mkoeppe Jul 3, 2023
e016c46
Update # needs
mkoeppe Jul 14, 2023
fdc9b25
sage.matrix: Update # needs
mkoeppe Jul 14, 2023
f3dd891
sage.modules: Update # needs
mkoeppe Jul 14, 2023
0d6b51b
src/sage/matrix: Update file-level doctest tag
mkoeppe Aug 7, 2023
feb46f8
src/sage/modules: Update file-level doctest tag
mkoeppe Aug 7, 2023
91febfe
src/sage/quadratic_forms: Update file-level doctest tag
mkoeppe Aug 7, 2023
f32adef
src/sage/stats: Update file-level doctest tag
mkoeppe Aug 7, 2023
35dee0e
src/sage/tensor: Update file-level doctest tag
mkoeppe Aug 7, 2023
63675be
src/sage/modules: sage -fixdoctests --only-tags
mkoeppe Aug 8, 2023
48aae7d
src/sage/probability: sage -fixdoctests --only-tags
mkoeppe Aug 8, 2023
2639932
src/sage/quadratic_forms: sage -fixdoctests --only-tags
mkoeppe Aug 8, 2023
2ddf149
src/sage/stats: sage -fixdoctests --only-tags
mkoeppe Aug 8, 2023
8833cf9
src/sage/tensor: sage -fixdoctests --only-tags
mkoeppe Aug 8, 2023
adb22d5
Use more block tags
mkoeppe Aug 11, 2023
fc36e24
Use more block tags, update # needs
mkoeppe Aug 11, 2023
cb4af40
src/sage/stats/time_series.pyx: More block tags
mkoeppe Aug 11, 2023
ee025b0
src/sage/stats/basic_stats.py: Fix import
mkoeppe Aug 11, 2023
33f8c98
Use more block tags, update # needs
mkoeppe Aug 11, 2023
e9643d8
Use more block tags, fix # needs, docstring cosmetics
mkoeppe Aug 11, 2023
4e3f558
Fixups
mkoeppe Aug 12, 2023
cea7d8d
src/sage/matrix/matrix_modn_dense_template.pxi: Fixup
mkoeppe Aug 12, 2023
786d6a4
src/sage/matrix/special.py: Restore a lost '# random'
mkoeppe Aug 12, 2023
640610a
sage.{homology,matrix,modules}: Protect timing out doctests from probing
mkoeppe Aug 12, 2023
f64c91e
src/sage/features/sagemath.py: Add feature sage.libs.linbox
mkoeppe Jul 17, 2023
a34c470
src/sage/features/sagemath.py: Add feature sage.libs.m4ri
mkoeppe Aug 13, 2023
4d7780b
Update # needs
mkoeppe Aug 13, 2023
017414a
Update # needs
mkoeppe Aug 13, 2023
60e906e
sage --fixdoctests --no-test src/sage/{matrix,modules,probability,sta…
mkoeppe Aug 13, 2023
865e178
src/sage/probability/probability_distribution.pyx: Docstring/doctest …
mkoeppe Aug 16, 2023
045d0e7
src/sage/stats/hmm/chmm.pyx: Docstring cosmetics
mkoeppe Aug 16, 2023
a054491
src/sage/stats/hmm/hmm.pyx: Docstring cosmetics
mkoeppe Aug 16, 2023
94b2c0b
src/sage/stats/hmm/distributions.pyx: Raw docstrings
mkoeppe Aug 16, 2023
8b80da1
src/sage/stats/time_series.pyx: Raw docstrings
mkoeppe Aug 16, 2023
48e8294
src/sage/matrix/constructor.pyx: Doctest cosmetics
mkoeppe Aug 17, 2023
aecbedc
src/sage/features/sagemath.py: Break some long docstring lines
mkoeppe Aug 17, 2023
4c4d62f
src/sage/stats/hmm/chmm.pyx: Fix docstring indentation
mkoeppe Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 64 additions & 7 deletions src/sage/features/sagemath.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,67 @@ def __init__(self):
PythonModule('sage.interfaces.gap')])


class sage__libs__linbox(JoinFeature):
r"""
A :class:`sage.features.Feature` describing the presence of :mod:`sage.libs.linbox`
and other modules depending on Givaro, FFLAS-FFPACK, LinBox.

In addition to the modularization purposes that this tag serves,
it also provides attribution to the upstream project.

TESTS::

sage: from sage.features.sagemath import sage__libs__linbox
sage: sage__libs__linbox().is_present() # needs sage.libs.linbox
FeatureTestResult('sage.libs.linbox', True)
"""
def __init__(self):
r"""
TESTS::

sage: from sage.features.sagemath import sage__libs__linbox
sage: isinstance(sage__libs__linbox(), sage__libs__linbox)
True
"""
JoinFeature.__init__(self, 'sage.libs.linbox',
[PythonModule('sage.rings.finite_rings.element_givaro')],
spkg='sagemath_linbox', type='standard')


class sage__libs__m4ri(JoinFeature):
r"""
A :class:`sage.features.Feature` describing the presence of Cython modules
depending on the M4RI and/or M4RIe libraries.

In addition to the modularization purposes that this tag serves,
it also provides attribution to the upstream project.

TESTS::

sage: from sage.features.sagemath import sage__libs__m4ri
sage: sage__libs__m4ri().is_present() # needs sage.libs.m4ri
FeatureTestResult('sage.libs.m4ri', True)
"""
def __init__(self):
r"""
TESTS::

sage: from sage.features.sagemath import sage__libs__m4ri
sage: isinstance(sage__libs__m4ri(), sage__libs__m4ri)
True
"""
JoinFeature.__init__(self, 'sage.libs.m4ri',
[PythonModule('sage.matrix.matrix_gf2e_dense')],
spkg='sagemath_m4ri', type='standard')


class sage__libs__ntl(JoinFeature):
r"""
A :class:`sage.features.Feature` describing the presence of :mod:`sage.libs.ntl`
and other modules depending on NTL and arb.
and other modules depending on NTL.

In addition to the modularization purposes that this tag serves, it also provides attribution
to the upstream project.
In addition to the modularization purposes that this tag serves,
it also provides attribution to the upstream project.

TESTS::

Expand All @@ -423,11 +477,12 @@ class sage__libs__pari(JoinFeature):
r"""
A :class:`~sage.features.Feature` describing the presence of :mod:`sage.libs.pari`.

SageMath uses the :ref:`PARI <spkg_pari>` library (via :ref:`cypari2 <spkg_cypari>`) for numerous purposes.
Doctests that involves such features should be marked ``# needs sage.libs.pari``.
SageMath uses the :ref:`PARI <spkg_pari>` library (via :ref:`cypari2
<spkg_cypari>`) for numerous purposes. Doctests that involves such features
should be marked ``# needs sage.libs.pari``.

In addition to the modularization purposes that this tag serves, it also provides attribution
to the upstream project.
In addition to the modularization purposes that this tag serves, it also
provides attribution to the upstream project.

EXAMPLES::

Expand Down Expand Up @@ -1005,6 +1060,8 @@ def all_features():
sage__libs__ecl(),
sage__libs__flint(),
sage__libs__gap(),
sage__libs__linbox(),
sage__libs__m4ri(),
sage__libs__ntl(),
sage__libs__pari(),
sage__libs__singular(),
Expand Down
2 changes: 2 additions & 0 deletions src/sage/homology/homology_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ def HomologyGroup(n, base_ring, invfac=None):
Multiplicative Abelian group isomorphic to Z x Z x Z x Z
sage: HomologyGroup(4, ZZ)
Z x Z x Z x Z

sage: # needs sage.libs.flint (otherwise timeout)
sage: HomologyGroup(100, ZZ)
Z^100
"""
Expand Down
14 changes: 7 additions & 7 deletions src/sage/matrix/action.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -209,23 +209,23 @@ cdef class MatrixMatrixAction(MatrixMulAction):

Respects compatible subdivisions::

sage: M = matrix(5, 5, prime_range(100))
sage: M.subdivide(2,3); M
sage: M = matrix(5, 5, prime_range(100)) # needs sage.libs.pari
sage: M.subdivide(2, 3); M # needs sage.libs.pari
[ 2 3 5| 7 11]
[13 17 19|23 29]
[--------+-----]
[31 37 41|43 47]
[53 59 61|67 71]
[73 79 83|89 97]
sage: N = matrix(5,2,[n^2 for n in range(10)])
sage: N.subdivide(3,1); N
sage: N = matrix(5, 2, [n^2 for n in range(10)])
sage: N.subdivide(3, 1); N
[ 0| 1]
[ 4| 9]
[16|25]
[--+--]
[36|49]
[64|81]
sage: M*N
sage: M*N # needs sage.libs.pari
[ 1048| 1388]
[ 3056| 4117]
[-----+-----]
Expand All @@ -235,7 +235,7 @@ cdef class MatrixMatrixAction(MatrixMulAction):

Note that this is just like block matrix multiplication::

sage: M.subdivision(0,0) * N.subdivision(0,0) + M.subdivision(0,1) * N.subdivision(1,0)
sage: M.subdivision(0,0) * N.subdivision(0,0) + M.subdivision(0,1) * N.subdivision(1,0) # needs sage.libs.pari
[1048]
[3056]

Expand All @@ -249,7 +249,7 @@ cdef class MatrixMatrixAction(MatrixMulAction):
[16|25]
[36|49]
[64|81]
sage: M*N
sage: M*N # needs sage.libs.pari
[ 1048 1388]
[ 3056 4117]
[ 5360 7303]
Expand Down
81 changes: 52 additions & 29 deletions src/sage/matrix/args.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ cdef class SparseEntry:
sage: from sage.matrix.args import SparseEntry
sage: SparseEntry(123, 456, "abc")
SparseEntry(123, 456, 'abc')
sage: SparseEntry(1/3, 2/3, x)
sage: SparseEntry(1/3, 2/3, x) # needs sage.symbolic
Traceback (most recent call last):
...
TypeError: unable to convert rational 1/3 to an integer
Expand Down Expand Up @@ -176,8 +176,10 @@ cdef class MatrixArgs:
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Real Double Field; typ=SCALAR; entries=3.141592653589793>
[3.141592653589793 0.0]
[ 0.0 3.141592653589793]
sage: ma = MatrixArgs(2, 2, entries=pi); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Symbolic Ring; typ=SCALAR; entries=pi>
sage: ma = MatrixArgs(2, 2, entries=pi); ma.finalized() # needs sage.symbolic
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices
over Symbolic Ring; typ=SCALAR; entries=pi>
sage: ma.matrix() # needs sage.symbolic
[pi 0]
[ 0 pi]
sage: ma = MatrixArgs(ZZ, 2, 2, entries={(0,0):7}); ma.finalized(); ma.matrix()
Expand All @@ -192,18 +194,27 @@ cdef class MatrixArgs:
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Integer Ring; typ=SEQ_FLAT; entries=(1, 2, 3, 4)>
[1 2]
[3 4]
sage: ma = MatrixArgs(QQ, entries=pari("[1,2;3,4]")); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Rational Field; typ=SEQ_FLAT; entries=[1, 2, 3, 4]>

sage: # needs sage.libs.pari
sage: ma = MatrixArgs(QQ, entries=pari("[1,2;3,4]")); ma.finalized()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices
over Rational Field; typ=SEQ_FLAT; entries=[1, 2, 3, 4]>
sage: ma.matrix()
[1 2]
[3 4]
sage: ma = MatrixArgs(QQ, 2, 2, entries=pari("[1,2,3,4]")); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Rational Field; typ=SEQ_FLAT; entries=[1, 2, 3, 4]>
sage: ma = MatrixArgs(QQ, 2, 2, entries=pari("[1,2,3,4]")); ma.finalized()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices
over Rational Field; typ=SEQ_FLAT; entries=[1, 2, 3, 4]>
sage: ma.matrix()
[1 2]
[3 4]
sage: ma = MatrixArgs(QQ, 2, 2, entries=pari("3/5")); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Rational Field; typ=SCALAR; entries=3/5>
sage: ma = MatrixArgs(QQ, 2, 2, entries=pari("3/5")); ma.finalized()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices
over Rational Field; typ=SCALAR; entries=3/5>
sage: ma.matrix()
[3/5 0]
[ 0 3/5]

sage: ma = MatrixArgs(entries=matrix(2,2)); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Integer Ring; typ=MATRIX; entries=[0 0]
[0 0]>
Expand All @@ -217,26 +228,37 @@ cdef class MatrixArgs:
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Integer Ring; typ=CALLABLE; entries=<function ...>>
[1 2]
[3 4]

sage: # needs numpy
sage: from numpy import array
sage: ma = MatrixArgs(array([[1,2],[3,4]])); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Integer Ring; typ=SEQ_SEQ; entries=array([[1, 2],
[3, 4]])>
sage: ma = MatrixArgs(array([[1,2],[3,4]])); ma.finalized()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices
over Integer Ring; typ=SEQ_SEQ; entries=array([[1, 2], [3, 4]])>
sage: ma.matrix()
[1 2]
[3 4]
sage: ma = MatrixArgs(array([[1.,2.],[3.,4.]])); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Real Double Field; typ=MATRIX; entries=[1.0 2.0]
[3.0 4.0]>
sage: ma = MatrixArgs(array([[1.,2.],[3.,4.]])); ma.finalized()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices
over Real Double Field; typ=MATRIX; entries=[1.0 2.0]
[3.0 4.0]>
sage: ma.matrix()
[1.0 2.0]
[3.0 4.0]
sage: ma = MatrixArgs(RealField(20), array([[1.,2.],[3.,4.]])); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Real Field with 20 bits of precision; typ=MATRIX; entries=[1.0 2.0]
[3.0 4.0]>
sage: ma = MatrixArgs(RealField(20), array([[1.,2.],[3.,4.]])); ma.finalized()
<MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices over Real Field
with 20 bits of precision; typ=MATRIX; entries=[1.0 2.0]
[3.0 4.0]>
sage: ma.matrix()
[1.0000 2.0000]
[3.0000 4.0000]
sage: ma = MatrixArgs(graphs.CycleGraph(3)); ma.finalized(); ma.matrix()
<MatrixArgs for Full MatrixSpace of 3 by 3 dense matrices over Integer Ring; typ=MATRIX; entries=[0 1 1]
[1 0 1]
[1 1 0]>

sage: # needs sage.graphs
sage: ma = MatrixArgs(graphs.CycleGraph(3)); ma.finalized()
<MatrixArgs for Full MatrixSpace of 3 by 3 dense matrices
over Integer Ring; typ=MATRIX; entries=[0 1 1]
[1 0 1]
[1 1 0]>
sage: ma.matrix()
[0 1 1]
[1 0 1]
[1 1 0]
Expand Down Expand Up @@ -458,8 +480,8 @@ cdef class MatrixArgs:

Sparse examples::

sage: ma = MatrixArgs(3, 3, pi)
sage: list(ma.iter(sparse=True))
sage: ma = MatrixArgs(3, 3, pi) # needs sage.symbolic
sage: list(ma.iter(sparse=True)) # needs sage.symbolic
[SparseEntry(0, 0, pi), SparseEntry(1, 1, pi), SparseEntry(2, 2, pi)]
sage: ma = MatrixArgs(2, 3)
sage: list(ma.iter(sparse=True))
Expand Down Expand Up @@ -819,11 +841,11 @@ cdef class MatrixArgs:
EXAMPLES::

sage: from sage.matrix.args import MatrixArgs
sage: MatrixArgs(pi).finalized()
sage: MatrixArgs(pi).finalized() # needs sage.symbolic
Traceback (most recent call last):
...
TypeError: the dimensions of the matrix must be specified
sage: MatrixArgs(RR, pi).finalized()
sage: MatrixArgs(RR, pi).finalized() # needs sage.symbolic
Traceback (most recent call last):
...
TypeError: the dimensions of the matrix must be specified
Expand Down Expand Up @@ -1222,6 +1244,7 @@ cdef class MatrixArgs:

Check that :trac:`26655` is fixed::

sage: # needs sage.rings.finite_rings
sage: F.<a> = GF(9)
sage: M = MatrixSpace(F, 2, 2)
sage: A = M([[1, a], [0, 1]])
Expand All @@ -1232,11 +1255,11 @@ cdef class MatrixArgs:
Constructing a matrix from a PARI ``t_VEC`` or ``t_COL`` with
``t_VEC`` or ``t_COL`` elements is currently not supported::

sage: M(pari([1, a, 0, 1]))
sage: M(pari([1, a, 0, 1])) # needs sage.libs.pari sage.rings.finite_rings
Traceback (most recent call last):
...
NameError: name 'a' is not defined
sage: M(pari([[1, a], [0, 1]]))
sage: M(pari([[1, a], [0, 1]])) # needs sage.libs.pari sage.rings.finite_rings
Traceback (most recent call last):
...
NameError: name 'a' is not defined
Expand Down Expand Up @@ -1351,7 +1374,7 @@ cpdef MatrixArgs MatrixArgs_init(space, entries):

sage: from sage.matrix.args import MatrixArgs_init
sage: S = MatrixSpace(GF(2), 2, 4)
sage: ma = MatrixArgs_init(S, {(1,3):7})
sage: ma = MatrixArgs_init(S, {(1, 3): 7})
sage: M = ma.matrix(); M
[0 0 0 0]
[0 0 0 1]
Expand Down
4 changes: 3 additions & 1 deletion src/sage/matrix/benchmark.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# sage.doctest: needs sage.flint
"""
Benchmarks for matrices

Expand All @@ -18,13 +19,14 @@
"""

from .constructor import random_matrix, Matrix
from sage.misc.lazy_import import lazy_import
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF
from sage.misc.timing import cputime
from cysignals.alarm import AlarmInterrupt, alarm, cancel_alarm

from sage.interfaces.magma import magma
lazy_import('sage.interfaces.magma', 'magma')

verbose = False

Expand Down
4 changes: 2 additions & 2 deletions src/sage/matrix/berlekamp_massey.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ def berlekamp_massey(a):
sage: from sage.matrix.berlekamp_massey import berlekamp_massey
sage: berlekamp_massey([1,2,1,2,1,2])
x^2 - 1
sage: berlekamp_massey([GF(7)(1),19,1,19])
sage: berlekamp_massey([GF(7)(1), 19, 1, 19])
x^2 + 6
sage: berlekamp_massey([2,2,1,2,1,191,393,132])
x^4 - 36727/11711*x^3 + 34213/5019*x^2 + 7024942/35133*x - 335813/1673
sage: berlekamp_massey(prime_range(2,38))
sage: berlekamp_massey(prime_range(2, 38)) # needs sage.libs.pari
x^6 - 14/9*x^5 - 7/9*x^4 + 157/54*x^3 - 25/27*x^2 - 73/18*x + 37/9

TESTS::
Expand Down
1 change: 1 addition & 0 deletions src/sage/matrix/compute_J_ideal.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# sage.doctest: needs sage.libs.pari (for charpoly, minimal_polynomial in __init__)
r"""
`J`-ideals of matrices

Expand Down
Loading