Ticket #11899: 11899_2.patch

File 11899_2.patch, 25.5 KB (added by saraedum, 11 years ago)

rebased previous patch against 4.8.alpha3

  • sage/calculus/riemann.pyx

    # HG changeset patch
    # User Julian Rueth <julian.rueth@gmail.com>
    Trac 11899: Add long time at various places
    
    diff --git a/sage/calculus/riemann.pyx b/sage/calculus/riemann.pyx
    index 57b0351..be16e67 100644
    a b cdef class Riemann_Map: 
    801801
    802802        High resolution plot::
    803803
    804             sage: m.plot_colored(plot_points=1000) # long time
     804            sage: m.plot_colored(plot_points=1000)  # long time (30s on sage.math, 2011)
    805805
    806806        To generate the unit circle map, it's helpful to see what the
    807807        colors correspond to::
  • sage/categories/classical_crystals.py

    diff --git a/sage/categories/classical_crystals.py b/sage/categories/classical_crystals.py
    index eef994a..79bd938 100644
    a b class ClassicalCrystals(Category): 
    338338
    339339            ::
    340340
    341                 sage: TestSuite(fb4(1,0,1,0)).run(verbose = True)
     341                sage: TestSuite(fb4(1,0,1,0)).run(verbose = True)  # long time (8s on sage.math, 2011)
    342342                running ._test_an_element() . . . pass
    343343                running ._test_category() . . . pass
    344344                running ._test_elements() . . .
  • sage/categories/coxeter_groups.py

    diff --git a/sage/categories/coxeter_groups.py b/sage/categories/coxeter_groups.py
    index 7f34df6..f0e47d1 100644
    a b class CoxeterGroups(Category): 
    11911191                sage: W = WeylGroup(["A",3])
    11921192                sage: P4 = Permutations(4)
    11931193                sage: def P4toW(w): return W.from_reduced_word(w.reduced_word())
    1194                 sage: for u in P4:
     1194                sage: for u in P4:  # long time (5s on sage.math, 2011)
    11951195                ...       for v in P4:
    11961196                ...           assert u.permutohedron_lequal(v) == P4toW(u).weak_le(P4toW(v))
    11971197                ...           assert u.permutohedron_lequal(v, side='left') == P4toW(u).weak_le(P4toW(v), side='left')
  • sage/categories/weyl_groups.py

    diff --git a/sage/categories/weyl_groups.py b/sage/categories/weyl_groups.py
    index fb794d8..92cd8e9 100644
    a b class WeylGroups(Category): 
    304304
    305305                sage: W = WeylGroup(['B',4])
    306306                sage: w = W.from_reduced_word([3,2,3,1])
    307                 sage: w.stanley_symmetric_function()
     307                sage: w.stanley_symmetric_function()  # long time (6s on sage.math, 2011)
    308308                48*m[1, 1, 1, 1] + 24*m[2, 1, 1] + 12*m[2, 2] + 8*m[3, 1] + 2*m[4]
    309309
    310310             * :meth:stanley_symmetric_function_as_polynomial`
  • sage/coding/binary_code.pyx

    diff --git a/sage/coding/binary_code.pyx b/sage/coding/binary_code.pyx
    index a8bccf4..12340e7 100644
    a b def test_word_perms(t_limit=5.0): 
    169169        permuting by the permutation and its inverse in either order, and
    170170        permuting by the identity both return the original word.
    171171   
    172     NOTE:
     172    .. NOTE::
     173
    173174        The functions permute_word_by_wp and dealloc_word_perm are implicitly
    174175        involved in each of the above tests.
    175176   
    176     TESTS:
     177    TESTS::
     178
    177179        sage: from sage.coding.binary_code import test_word_perms
    178         sage: test_word_perms()
     180        sage: test_word_perms()  # long time (5s on sage.math, 2011)
    179181
    180182    """
    181183    cdef WordPermutation *g, *h, *i
  • sage/coding/linear_code.py

    diff --git a/sage/coding/linear_code.py b/sage/coding/linear_code.py
    index 8038718..8f9317a 100644
    a b class LinearCode(module.Module_old): 
    18571857            sage: M11 = MathieuGroup(11)
    18581858            sage: M11.order()
    18591859            7920
    1860             sage: G = C.permutation_automorphism_group()  # this should take < 5 seconds 
    1861             sage: G.is_isomorphic(M11)                    # this should take < 5 seconds 
     1860            sage: G = C.permutation_automorphism_group()  # long time (6s on sage.math, 2011)
     1861            sage: G.is_isomorphic(M11)                    # long time
    18621862            True
    18631863       
    18641864        Other examples::
  • sage/combinat/crystals/tensor_product.py

    diff --git a/sage/combinat/crystals/tensor_product.py b/sage/combinat/crystals/tensor_product.py
    index d4bedff..2b2d182 100644
    a b class TensorProductOfCrystalsElement(ImmutableListWithParent): 
    654654            sage: K = KirillovReshetikhinCrystal(['C',2,1],1,2)
    655655            sage: T = TensorProductOfCrystals(K,K)
    656656            sage: hw = [b for b in T if all(b.epsilon(i)==0 for i in [1,2])]
    657             sage: for b in hw:
     657            sage: for b in hw:  # long time (5s on sage.math, 2011)
    658658            ...       print b, b.energy_function()
    659659            ...     
    660660            [[], []] 4
  • sage/combinat/partition.py

    diff --git a/sage/combinat/partition.py b/sage/combinat/partition.py
    index acb35ab..82bee4e 100644
    a b def from_core_and_quotient(core, quotient): 
    380380        sage: Partition(core=[2,1], quotient=[[2,1],[3],[1,1,1]])
    381381        [11, 5, 5, 3, 2, 2, 2]
    382382
    383     TESTS: We check that #11412 is actually fixed::
     383    TESTS:
     384
     385    We check that #11412 is actually fixed::
    384386
    385387        sage: test = lambda x, k: x == Partition(core=x.core(k),
    386388        ...                                      quotient=x.quotient(k))
    def from_core_and_quotient(core, quotient): 
    391393        ...       Partition(core=core, quotient=mus).core(len(mus)) == core
    392394        ...       and
    393395        ...       Partition(core=core, quotient=mus).quotient(len(mus)) == mus)
    394         sage: all(test2(core,tuple(mus))
     396        sage: all(test2(core,tuple(mus))  # long time (5s on sage.math, 2011)
    395397        ...       for k in range(1,10)
    396398        ...       for n_core in range(10-k)
    397399        ...       for core in Partitions(n_core)
  • sage/combinat/root_system/pieri_factors.py

    diff --git a/sage/combinat/root_system/pieri_factors.py b/sage/combinat/root_system/pieri_factors.py
    index 55f7e3a..4078d71 100644
    a b class PieriFactors_type_C_affine(PieriFactors_affine_type): 
    805805            sage: PF = WeylGroup(['C',3,1]).pieri_factors()
    806806            sage: PF.__class__
    807807            <class 'sage.combinat.root_system.pieri_factors.PieriFactors_type_C_affine_with_category'>
    808             sage: TestSuite(PF).run()
     808            sage: TestSuite(PF).run()  # long time (4s on sage.math, 2011)
    809809        """
    810810        Parent.__init__(self, category = FiniteEnumeratedSets())
    811811        self.W = W
  • sage/crypto/mq/sr.py

    diff --git a/sage/crypto/mq/sr.py b/sage/crypto/mq/sr.py
    index 8eac887..eeefbb6 100644
    a b def test_consistency(max_n=2, **kwargs): 
    33533353    has a more reasonable memory usage. ::
    33543354   
    33553355        sage: from sage.crypto.mq.sr import test_consistency
    3356         sage: test_consistency(1)  # long time (80s on sage.math, 2011)
     3356        sage: test_consistency(1)  # long time (73s on sage.math, 2011)
    33573357        True
    33583358    """
    33593359    consistent = True
  • sage/finance/time_series.pyx

    diff --git a/sage/finance/time_series.pyx b/sage/finance/time_series.pyx
    index 7e10467..04918c3 100644
    a b cdef class TimeSeries: 
    10591059            sage: v.plot()
    10601060            sage: v.plot(points=True)
    10611061            sage: v.plot() + v.plot(points=True, rgbcolor='red')
    1062             sage: v.plot() + v.plot(points=True, rgbcolor='red',pointsize=50)
     1062            sage: v.plot() + v.plot(points=True, rgbcolor='red', pointsize=50)
    10631063        """
    10641064        from sage.plot.all import line, point
    10651065        cdef Py_ssize_t s
  • sage/graphs/generic_graph.py

    diff --git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
    index 84725ee..0322e12 100644
    a b class GenericGraph(GenericGraph_pyx): 
    1347013470       
    1347113471            sage: C = graphs.CubeGraph(8)
    1347213472            sage: P = C.plot(vertex_labels=False, vertex_size=0, graph_border=True)
    13473             sage: P.show()
     13473            sage: P.show()  # long time (3s on sage.math, 2011)
    1347413474        """
    1347513475        kwds.setdefault('figsize', [4,4])
    1347613476        from graph_plot import graphplot_options
  • sage/groups/matrix_gps/matrix_group.py

    diff --git a/sage/groups/matrix_gps/matrix_group.py b/sage/groups/matrix_gps/matrix_group.py
    index 755810b..7ccdb1e 100644
    a b class MatrixGroup_gens(MatrixGroup_gap): 
    10961096            sage: F = GF(5); MS = MatrixSpace(F,2,2)
    10971097            sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[-1,1]])]
    10981098            sage: G = MatrixGroup(gens)
    1099             sage: G.invariant_generators()  # long time (68s on sage.math, 2011)
     1099            sage: G.invariant_generators()  # long time (64s on sage.math, 2011)
    11001100            [x1^20 + x1^16*x2^4 + x1^12*x2^8 + x1^8*x2^12 + x1^4*x2^16 + x2^20, x1^20*x2^4 + x1^16*x2^8 + x1^12*x2^12 + x1^8*x2^16 + x1^4*x2^20]
    11011101            sage: F=CyclotomicField(8)
    11021102            sage: z=F.gen()
  • sage/gsl/fft.pyx

    diff --git a/sage/gsl/fft.pyx b/sage/gsl/fft.pyx
    index 7b2a01e..fd6ba8e 100644
    a b from sage.rings.complex_number import ComplexNumber 
    3434def FastFourierTransform(size, base_ring=None):
    3535    """
    3636    EXAMPLES::
     37
    3738        sage: a = FastFourierTransform(128)
    3839        sage: for i in range(1, 11):
    3940        ...    a[i] = 1
    cdef class FastFourierTransform_complex(FastFourierTransform_base): 
    178179        gsl_fft_complex_radix2_inverse is automatically called.
    179180        Otherwise, gsl_fft_complex_inverse is called.
    180181
    181         EXAMPLES:
     182        EXAMPLES::
     183
    182184            sage: a = FastFourierTransform(125)
    183185            sage: b = FastFourierTransform(125)
    184186            sage: for i in range(1, 60): a[i]=1
    cdef class FastFourierTransform_complex(FastFourierTransform_base): 
    206208        using the Cooley-Tukey algorithm. This is the same as "inverse"
    207209        but lacks normalization so that backwards*forwards(f) = n*f.
    208210
    209         EXAMPLES:
     211        EXAMPLES::
     212
    210213            sage: a = FastFourierTransform(125)
    211214            sage: b = FastFourierTransform(125)
    212215            sage: for i in range(1, 60): a[i]=1
    213216            sage: for i in range(1, 60): b[i]=1
    214217            sage: a.forward_transform()
    215218            sage: a.backward_transform()
    216             sage: (a.plot() + b.plot()).show(ymin=0)
     219            sage: (a.plot() + b.plot()).show(ymin=0)  # long time (2s on sage.math, 2011)
    217220        """
    218221        cdef gsl_fft_complex_wavetable * wt
    219222        cdef gsl_fft_complex_workspace * mem
  • sage/homology/examples.py

    diff --git a/sage/homology/examples.py b/sage/homology/examples.py
    index 630e498..2d4b815 100644
    a b class SimplicialComplexExamples(): 
    495495            [1, 11, 51, 80, 40]
    496496            sage: P3.homology()
    497497            {0: 0, 1: C2, 2: 0, 3: Z}
    498             sage: P4 = simplicial_complexes.RealProjectiveSpace(4) # long time: 2 seconds
     498            sage: P4 = simplicial_complexes.RealProjectiveSpace(4) # long time (2s on sage.math, 2011)
    499499            sage: P4.f_vector() # long time
    500500            [1, 16, 120, 330, 375, 150]
    501501            sage: P4.homology() # long time
    502502            {0: 0, 1: C2, 2: 0, 3: C2, 4: 0}
    503             sage: P5 = simplicial_complexes.RealProjectiveSpace(5) # long time: 45 seconds
     503            sage: P5 = simplicial_complexes.RealProjectiveSpace(5) # long time (40s on sage.math, 2011)
    504504            sage: P5.f_vector()  # long time
    505505            [1, 63, 903, 4200, 8400, 7560, 2520]
    506506
  • sage/libs/ntl/ntl_mat_ZZ.pyx

    diff --git a/sage/libs/ntl/ntl_mat_ZZ.pyx b/sage/libs/ntl/ntl_mat_ZZ.pyx
    index 9b4ed3a..d7e6902 100644
    a b cdef class ntl_mat_ZZ: 
    386386            sage: t = cputime(); d = A.determinant()
    387387            sage: cputime(t)          # random
    388388            0.33201999999999998
    389             sage: t = cputime(); B = A.HNF(d)
     389            sage: t = cputime(); B = A.HNF(d)  # long time (5s on sage.math, 2011)
    390390            sage: cputime(t)          # random
    391391            6.4924050000000006
    392392
  • sage/matrix/matrix_cyclo_dense.pyx

    diff --git a/sage/matrix/matrix_cyclo_dense.pyx b/sage/matrix/matrix_cyclo_dense.pyx
    index 20a0b6b..0eb65c1 100644
    a b cdef class Matrix_cyclo_dense(matrix_dense.Matrix_dense): 
    14791479
    14801480        The result is cached for each algorithm separately.
    14811481
    1482         EXAMPLES:
     1482        EXAMPLES::
     1483
    14831484            sage: W.<z> = CyclotomicField(3)
    14841485            sage: A = matrix(W, 2, 3, [1+z, 2/3, 9*z+7, -3 + 4*z, z, -7*z]); A
    14851486            [  z + 1     2/3 9*z + 7]
    cdef class Matrix_cyclo_dense(matrix_dense.Matrix_dense): 
    14911492            [                  1                   0  -192/97*z - 361/97]
    14921493            [                  0                   1 1851/97*z + 1272/97]
    14931494
    1494         We verify that the result is cached and that the caches are separate:
     1495        We verify that the result is cached and that the caches are separate::
     1496
    14951497            sage: A.echelon_form() is A.echelon_form()
    14961498            True
    14971499            sage: A.echelon_form() is A.echelon_form(algorithm='classical')
    14981500            False
    14991501
    1500         TESTS:
     1502        TESTS::
     1503
    15011504            sage: W.<z> = CyclotomicField(13)
    15021505            sage: A = Matrix(W, 2,3, [10^30*(1-z)^13, 1, 2, 3, 4, z])
    15031506            sage: B = Matrix(W, 2,3, [(1-z)^13, 1, 2, 3, 4, z])
    1504             sage: A.echelon_form() == A.echelon_form('classical')
     1507            sage: A.echelon_form() == A.echelon_form('classical')  # long time (4s on sage.math, 2011)
    15051508            True
    15061509            sage: B.echelon_form() == B.echelon_form('classical')
    15071510            True
    15081511
    1509         A degenerate case with the degree 1 cyclotomic field:
     1512        A degenerate case with the degree 1 cyclotomic field::
     1513
    15101514            sage: A = matrix(CyclotomicField(1),2,3,[1,2,3,4,5,6]);
    15111515            sage: A.echelon_form()
    15121516            [ 1  0 -1]
    15131517            [ 0  1  2]
    15141518
    1515         A case that checks the bug in trac #3500.
     1519        A case that checks the bug in trac #3500. ::
     1520
    15161521            sage: cf4 = CyclotomicField(4) ; z4 = cf4.0
    15171522            sage: A = Matrix(cf4, 1, 2, [-z4, 1])
    15181523            sage: A.echelon_form()
  • sage/modular/abvar/homspace.py

    diff --git a/sage/modular/abvar/homspace.py b/sage/modular/abvar/homspace.py
    index 1abd48e..e30f640 100644
    a b one endomorphism ring for the newform 33a (since it is again 
    134134     Abelian variety endomorphism of Abelian subvariety of dimension 2 of J0(33))
    135135    sage: B.endomorphism_ring().gens()
    136136    (Abelian variety endomorphism of Abelian subvariety of dimension 1 of J0(33),)
    137     sage: E = J.endomorphism_ring() ; E.gens()
     137    sage: E = J.endomorphism_ring() ; E.gens()  # long time (3s on sage.math, 2011)
    138138    (Abelian variety endomorphism of Abelian variety J0(33) of dimension 3,
    139139     Abelian variety endomorphism of Abelian variety J0(33) of dimension 3,
    140140     Abelian variety endomorphism of Abelian variety J0(33) of dimension 3,
    of T in its saturation, which is 1 in this case. 
    148148
    149149::
    150150
    151     sage: T = E.image_of_hecke_algebra()
    152     sage: T.gens()
     151    sage: T = E.image_of_hecke_algebra()  # long time
     152    sage: T.gens()  # long time
    153153    (Abelian variety endomorphism of Abelian variety J0(33) of dimension 3,
    154154     Abelian variety endomorphism of Abelian variety J0(33) of dimension 3,
    155155     Abelian variety endomorphism of Abelian variety J0(33) of dimension 3)
    156     sage: T.index_in(E)
     156    sage: T.index_in(E)  # long time
    157157    +Infinity
    158     sage: T.index_in_saturation()
     158    sage: T.index_in_saturation()  # long time
    159159    1
    160160
    161161AUTHORS:
    class EndomorphismSubring(Homspace, Ring): 
    832832       
    833833            sage: J0(33).endomorphism_ring().discriminant()
    834834            -64800
    835             sage: J0(46).endomorphism_ring().discriminant()
     835            sage: J0(46).endomorphism_ring().discriminant()  # long time (6s on sage.math, 2011)
    836836            24200000000
    837837            sage: J0(11).endomorphism_ring().discriminant()
    838838            2
  • sage/modular/hecke/element.py

    diff --git a/sage/modular/hecke/element.py b/sage/modular/hecke/element.py
    index c579524..918d36f 100644
    a b class HeckeModuleElement(sage.modules.module_element.ModuleElement): 
    266266            True
    267267            sage: CuspForms(22, 2).0.is_old()
    268268            True
    269             sage: EisensteinForms(144, 2).1.is_old()
     269            sage: EisensteinForms(144, 2).1.is_old()  # long time (3s on sage.math, 2011)
    270270            False
    271271            sage: EisensteinForms(144, 2).1.is_old(2) # not implemented
    272272            False
  • sage/modular/modform/constructor.py

    diff --git a/sage/modular/modform/constructor.py b/sage/modular/modform/constructor.py
    index bddae13..454223e 100644
    a b def ModularForms(group = 1, 
    222222        sage: G = GammaH(30, [11])
    223223        sage: M = ModularForms(G, 2); M
    224224        Modular Forms space of dimension 20 for Congruence Subgroup Gamma_H(30) with H generated by [11] of weight 2 over Rational Field
    225         sage: M.T(7).charpoly().factor()
     225        sage: M.T(7).charpoly().factor()  # long time (7s on sage.math, 2011)
    226226        (x + 4) * x^2 * (x - 6)^4 * (x + 6)^4 * (x - 8)^7 * (x^2 + 4)
    227227       
    228228    More examples of spaces with character::
  • sage/modular/modform/space.py

    diff --git a/sage/modular/modform/space.py b/sage/modular/modform/space.py
    index 1b91bc9..812a7b9 100644
    a b class ModularFormsSpace(hecke.HeckeModule_generic): 
    13111311
    13121312        We check that #10450 is fixed::
    13131313
    1314             sage: M = CuspForms(Gamma1(22), 2).new_submodule()
    1315             sage: M.hecke_matrix(3)
     1314            sage: M = CuspForms(Gamma1(22), 2).new_submodule()  # long time (3s on sage.math, 2011)
     1315            sage: M.hecke_matrix(3)  # long time
    13161316            [ 0 -2  3  0]
    13171317            [ 0 -3  5 -1]
    13181318            [ 1 -1  0 -1]
    13191319            [ 0 -2  3 -1]
    1320             sage: M.hecke_matrix(9)
     1320            sage: M.hecke_matrix(9)  # long time
    13211321            [ 3  3 -4 -4]
    13221322            [ 2  6 -9 -4]
    13231323            [ 0  3 -2 -1]
  • sage/plot/plot3d/list_plot3d.py

    diff --git a/sage/plot/plot3d/list_plot3d.py b/sage/plot/plot3d/list_plot3d.py
    index 6aa4cfe..33ab974 100644
    a b def list_plot3d(v, interpolation_type='default', texture="automatic", point_list 
    124124        ...         l.append((float(i*pi/5),float(j*pi/5),m[i,j]))
    125125        sage: list_plot3d(l,texture='yellow')
    126126   
    127     Note that the points do not have to be regularly sampled. For example:
    128    
    129     ::
     127    Note that the points do not have to be regularly sampled. For example::
    130128   
    131129        sage: l=[]
    132130        sage: for i in range(-5,5):
    def list_plot3d(v, interpolation_type='default', texture="automatic", point_list 
    135133        sage: list_plot3d(l,interpolation_type='nn',texture='yellow',num_points=100)
    136134
    137135    TESTS:
     136
    138137    We plot 0, 1, and 2 points::
    139138   
    140139        sage: list_plot3d([])
  • sage/plot/plot3d/plot3d.py

    diff --git a/sage/plot/plot3d/plot3d.py b/sage/plot/plot3d/plot3d.py
    index 25bb2b9..7f6a0d7 100644
    a b def spherical_plot3d(f, urange, vrange, **kwds): 
    901901        sage: Y = spherical_harmonic(2, 1, theta, phi)
    902902        sage: rea = spherical_plot3d(abs(real(Y)), (phi,0,2*pi), (theta,0,pi), color='blue', opacity=0.6)
    903903        sage: ima = spherical_plot3d(abs(imag(Y)), (phi,0,2*pi), (theta,0,pi), color='red', opacity=0.6)
    904         sage: (rea + ima).show(aspect_ratio=1)
     904        sage: (rea + ima).show(aspect_ratio=1)  # long time (4s on sage.math, 2011)
    905905
    906906    A drop of water::
    907907
  • sage/schemes/elliptic_curves/BSD.py

    diff --git a/sage/schemes/elliptic_curves/BSD.py b/sage/schemes/elliptic_curves/BSD.py
    index 035c178..fb012dd 100644
    a b def prove_BSD(E, verbosity=0, two_desc='mwrank', proof=None, secs_hi=5, 
    425425    ::
    426426   
    427427        sage: E = EllipticCurve('960d1')
    428         sage: E.prove_BSD(verbosity=1)
     428        sage: E.prove_BSD(verbosity=1)  # long time (4s on sage.math, 2011)
    429429        p = 2: True by 2-descent
    430430        True for p not in {2} by Kolyvagin.
    431431        []
  • sage/schemes/elliptic_curves/ell_finite_field.py

    diff --git a/sage/schemes/elliptic_curves/ell_finite_field.py b/sage/schemes/elliptic_curves/ell_finite_field.py
    index 1c70708..66a79a8 100644
    a b class EllipticCurve_finite_field(EllipticCurve_field, HyperellipticCurve_finite_ 
    13581358            sage: E = EllipticCurve('389a')
    13591359            sage: for p in [5927, 2297, 1571, 1709, 3851, 127, 3253, 5783, 3499, 4817]:
    13601360            ...       G = E.change_ring(GF(p)).abelian_group()       
    1361             sage: for p in prime_range(10000):           #long time (~20s)
     1361            sage: for p in prime_range(10000):  # long time (19s on sage.math, 2011)
    13621362            ...       if p != 389:
    1363             ...           G=E.change_ring(GF(p)).abelian_group()
     1363            ...           G = E.change_ring(GF(p)).abelian_group()
    13641364       
    13651365        This tests that the bug reported in trac #3926 has been fixed::
    13661366       
  • sage/schemes/generic/fano_toric_variety.py

    diff --git a/sage/schemes/generic/fano_toric_variety.py b/sage/schemes/generic/fano_toric_variety.py
    index d9fb660..10416b5 100644
    a b class CPRFanoToricVariety_field(ToricVariety_field): 
    10941094        We construct several complete intersections associated to the same
    10951095        nef-partition of the 3-dimensional reflexive polytope #2254::
    10961096
    1097             sage: p = ReflexivePolytope(3, 2254)
    1098             sage: np = p.nef_partitions()[1]
    1099             sage: np
     1097            sage: p = ReflexivePolytope(3, 2254)  # long time (7s on sage.math, 2011)
     1098            sage: np = p.nef_partitions()[1]      # long time
     1099            sage: np  # long time
    11001100            Nef-partition {2, 3, 4, 7, 8} U {0, 1, 5, 6}
    1101             sage: X = CPRFanoToricVariety(Delta_polar=p)
    1102             sage: X.nef_complete_intersection(np)
     1101            sage: X = CPRFanoToricVariety(Delta_polar=p)  # long time
     1102            sage: X.nef_complete_intersection(np)  # long time
    11031103            Closed subscheme of 3-d CPR-Fano toric variety
    11041104            covered by 10 affine patches defined by:
    11051105              a2*z1*z4^2*z5^2*z7^3 + a1*z2*z4*z5*z6*z7^2*z8^2
    class CPRFanoToricVariety_field(ToricVariety_field): 
    11101110             
    11111111        Now we include only monomials associated to vertices of `\Delta_i`::
    11121112       
    1113             sage: X.nef_complete_intersection(np, monomial_points="vertices")
     1113            sage: X.nef_complete_intersection(np, monomial_points="vertices")  # long time
    11141114            Closed subscheme of 3-d CPR-Fano toric variety
    11151115            covered by 10 affine patches defined by:
    11161116              a2*z1*z4^2*z5^2*z7^3 + a1*z2*z4*z5*z6*z7^2*z8^2
    class CPRFanoToricVariety_field(ToricVariety_field): 
    11211121        (effectively, we set ``b5=0``). Next we provide coefficients explicitly
    11221122        instead of using default generic names::
    11231123       
    1124             sage: X.nef_complete_intersection(np, monomial_points="vertices",
    1125             ...       coefficients=[range(1,5), range(1, 6)])
     1124            sage: X.nef_complete_intersection(np,  # long time
     1125            ...         monomial_points="vertices",
     1126            ...         coefficients=[range(1,5), range(1,6)])
    11261127            Closed subscheme of 3-d CPR-Fano toric variety
    11271128            covered by 10 affine patches defined by:
    11281129              3*z1*z4^2*z5^2*z7^3 + 2*z2*z4*z5*z6*z7^2*z8^2
    class CPRFanoToricVariety_field(ToricVariety_field): 
    11331134        Finally, we take a look at the generic representative of these complete
    11341135        intersections in a completely resolved ambient toric variety::
    11351136       
    1136             sage: X = CPRFanoToricVariety(Delta_polar=p,
    1137             ...                           coordinate_points="all")
    1138             sage: X.nef_complete_intersection(np)
     1137            sage: X = CPRFanoToricVariety(Delta_polar=p,  # long time
     1138            ...                      coordinate_points="all")
     1139            sage: X.nef_complete_intersection(np)  # long time
    11391140            Closed subscheme of 3-d CPR-Fano toric variety
    11401141            covered by 22 affine patches defined by:
    11411142              a1*z2*z4*z5*z6*z7^2*z8^2*z9^2*z10^2*z11*z12*z13
  • sage/schemes/generic/toric_chow_group.py

    diff --git a/sage/schemes/generic/toric_chow_group.py b/sage/schemes/generic/toric_chow_group.py
    index cc0de30..c41aac4 100644
    a b EXAMPLES:: 
    6969    sage: A.degree(2).ngens()
    7070    7
    7171    sage: a = sum( A.gen(i) * (i+1) for i in range(0,A.ngens()) )   # an element of A
    72     sage: a
     72    sage: a  # long time (2s on sage.math, 2011)
    7373    ( 3 | 1 mod 7 | 0 mod 2, 1 mod 2, 4, 5, 6, 7, 8 | 9 )
    7474
    7575The Chow group elements are printed as ``( a0 | a1 mod 7 | a2 mod 2,
  • sage/tests/french_book/numbertheory.py

    diff --git a/sage/tests/french_book/numbertheory.py b/sage/tests/french_book/numbertheory.py
    index e0a76ec..19147e2 100644
    a b sage: def count_primes5(n): 
    114114...    s=0
    115115...    for p in prime_range(n): s+=1
    116116...    return s
    117 sage: timeit('count_primes1(10^5)') # random long time
     117sage: timeit('count_primes1(10^5)') # random, not tested
    1181185 loops, best of 3: 674 ms per loop
    119 sage: timeit('count_primes2(10^5)') # random long time
     119sage: timeit('count_primes2(10^5)') # random, not tested
    1201205 loops, best of 3: 256 ms per loop
    121121sage: timeit('count_primes3(10^5)') # random
    1221225 loops, best of 3: 49.2 ms per loop