1. 16 May, 2017 3 commits
  2. 15 May, 2017 1 commit
  3. 12 May, 2017 4 commits
    • Volker Braun's avatar
      Updated SageMath version to 8.0.beta6 · df03447e
      Volker Braun authored
    • Release Manager's avatar
      Trac #22729: Expose some internal variables computed in hecke_series · 86557bd9
      Release Manager authored
      This ticket exposes (by turning on a flag) certain nontrivial data
      computed in the {{{hecke_series}}} which is currently hidden from the
      user. This may be (is) useful in other applications of A.Lauder's code.
      URL: https://trac.sagemath.org/22729
      Reported by: mmasdeu
      Ticket author(s): Marc Masdeu
      Reviewer(s): Frédéric Chapoton
    • Release Manager's avatar
      Trac #21993: Polyhedron.integral_points(): OverflowError: value too large to convert to int · f14995be
      Release Manager authored
      I noticed the following bug in Sage:
      sage: %timeit (Polyhedron(vertices=((0, 0), (1789345,37121))) +
      /site-packages/sage/geometry/polyhedron/base.pyc in
      integral_points(self, threshold)
         4357                 box_points<threshold:
         4358             from sage.geometry.integral_points import
      -> 4359             return rectangular_box_points(box_min, box_max,
         4361         # for more complicate polytopes, triangulate & use smith
      normal form
      rebasing/src/sage/geometry/integral_points.pyx in
          552     v = vector(ZZ, d)
          553     if not return_saturated:
      --> 554         for p in loop_over_rectangular_box_points(box_min,
      box_max, inequalities, d, count_only):
          555             #  v = vector(ZZ, orig_perm.action(p))   # too slow
          556             for i in range(0,d):
      rebasing/src/sage/geometry/integral_points.pyx in
          601     while True:
          602         sig_check()
      --> 603         inequalities.prepare_inner_loop(p)
          604         i_min = box_min[0]
          605         i_max = box_max[0]
      rebasing/src/sage/geometry/integral_points.pyx in
         1256         """
         1257         for ineq in self.ineqs_int:
      -> 1258             (<Inequality_int>ineq).prepare_inner_loop(p)
         1259         for ineq in self.ineqs_generic:
         1260             (<Inequality_generic>ineq).prepare_inner_loop(p)
      rebasing/src/sage/geometry/integral_points.pyx in
          938         cdef int j
          939         if self.dim>1:
      --> 940             self.cache = self.cache_next + self.coeff_next*p[1]
          941         else:
          942             self.cache = self.cache_next
      OverflowError: value too large to convert to int
      (Note that this example would not get far with the code in Sage anyway
      because the code tries to use the rectangle bounding box method for all
      non-integral polytopes.)
      URL: https://trac.sagemath.org/21993
      Reported by: mkoeppe
      Ticket author(s): Matthias Koeppe
      Reviewer(s): Sébastien Labbé
    • Release Manager's avatar
      Trac #21668: sage.stats.basic_stats.mode doesn't sort · 3c79df84
      Release Manager authored
      The {{{sage.stats.basic_stats.mode}}} function claims to sort the
      result, but it doesn't.
      sage: my_list =  [0, 2, 7, 7, 13, 20, 2, 13]
      sage: mode(my_list)
      [2, 13, 7]
      Here is a possible fix by Murray Tannock
      def mode(v):
          Return the mode of `v`.  The mode is the sorted list of the most
          frequently occurring elements in `v`.  If `n` is the most times
          that any element occurs in `v`, then the mode is the sorted list
          of elements of `v` that occur `n` times.
          NOTE: The elements of `v` must be hashable and comparable.
              - `v` -- a list
              - a list
              sage: v = [1,2,4,1,6,2,6,7,1]
              sage: mode(v)
              sage: v.count(1)
              sage: mode([])
              sage: mode([1,2,3,4,5])
              [1, 2, 3, 4, 5]
              sage: mode([0, 2, 7, 7, 13, 20, 2, 13])
              [2, 7, 13]
              sage: mode(['sage', 4, I, 3/5, 'sage', pi])
              sage: class MyClass:
              ...     def mode(self):
              ...         return [1]
              sage: stats.mode(MyClass())
          if hasattr(v,'mode'): return v.mode()
          from operator import itemgetter
          freq = {}
          for i in v:
              if i in freq:
                  freq[i] += 1
                  freq[i] = 1
          s = sorted(freq.items(), key=itemgetter(1,0))
          return [i[0] for i in s if i[1] == s[-1][1]]
      URL: https://trac.sagemath.org/21668
      Reported by: schilly
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
  4. 11 May, 2017 4 commits
    • Release Manager's avatar
      Trac #19139: Implement categories for KR crystals · 476ef25f
      Release Manager authored
      The aim of this ticket is to implement a category for KR crystals and
      their tensor products. We do so by implementing a category for
      (abstract) U,,q,,'(''g'')-crystals, which I have called `LoopCrystals`
      in regards to thinking of them as modules in the loop algebra ''g''[t].
      There will be a regular loop crystals subcategory, and from that, the
      subcategories with be KR crystals and their tensor products (which do
      not have a subcategory relationship).
      This allows for a uniform interface for all KR crystals, allowing us to
      define things like `energy_function` for only tensor products of KR
      crystals where we don't have to check types. This also makes the default
      weight lattice for general crystals of affine type be the extended
      affine weight lattice, but anything in the affine derived subalgebra
      category will use the non-extended weight lattice. As a consequence, it
      removes duplication of trivial `weight_lattice_realization` methods.
      This category also allows a better interface which to draw 0-arrows in
      reverse for digraphs.
      URL: https://trac.sagemath.org/19139
      Reported by: tscrim
      Ticket author(s): Travis Scrimshaw
      Reviewer(s): Ben Salisbury
    • Release Manager's avatar
      Trac #17505: implement symbolic product · 540e6b9a
      Release Manager authored
      The symbolic product is currently broken in Sage :
      * It cannot be created in Sage :
      sage: var("j,p", domain="integer")
      sage: X,Y=function("X,Y")
      sage: prod(X(j),j,1,p)
      TypeError                                 Traceback (most recent call
      <ipython-input-5-85e69544cbe9> in <module>()
      ----> 1 prod(X(j),j,Integer(1),p)
      /usr/local/sage-8/src/sage/misc/misc_c.pyx in sage.misc.misc_c.prod
      ---> 71 def prod(x, z=None, Py_ssize_t recursion_cutoff=5):
           72     """
           73     Return the product of the elements in the list x.
      TypeError: prod() takes at most 3 positional arguments (4 given)
      sage: product(X(j),j,1,p)
      NameError                                 Traceback (most recent call
      <ipython-input-6-4d04d74c7489> in <module>()
      ----> 1 product(X(j),j,Integer(1),p)
      NameError: name 'product' is not defined
      At the moment anonymous functions named `product` can be created via the
      Maxima {{{pexpect}}} interface and they even behave as products in
      specific cases:
      sage: maxima("prod(X(j),j,1,p)").sage().log().log_expand()
      sum(log(X(j)), j, 1, p)
      The present ticket aims at creating a Sage function/method either
      evaluating the sum, or correctly creating a unevaluted symbolic product
      For evaluation the ticket would have to decide which of (Maxima,SymPy)
      would be used as default for this.
      sage: import sympy
      sage: x = sympy.Symbol('x')
      sage: n = sympy.Symbol('n')
      sage: sympy.product(x, (x, 1, n))
      sage: sympy.product(sin(x), (x, 1, n))
      Product(sin(x), (x, 1, n))
      Creating products by casting a Maxima expression via the library
      interface gives nonsense, see #17502.
      URL: https://trac.sagemath.org/17505
      Reported by: rws
      Ticket author(s): Ralf Stephan
      Reviewer(s): Emmanuel Charpentier
    • Ralf Stephan's avatar
      17505: address reviewer's suggestions · 7a56004c
      Ralf Stephan authored
    • Ralf Stephan's avatar
      17505: fix doctests · 58119b0d
      Ralf Stephan authored
  5. 10 May, 2017 4 commits
    • Release Manager's avatar
      Trac #22939: fixing a typo · 22089236
      Release Manager authored
      from a pull request in github
      URL: https://trac.sagemath.org/22939
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
    • Release Manager's avatar
      Trac #22674: Add irreducibles_poset() · 068b0933
      Release Manager authored
      This patch will add a function that gives the smallest subposet having
      completion by cuts isomorphic to the lattice. (I.e. the poset of meet-
      and join- (or both) irreducibles, except the one-element lattice.)
      URL: https://trac.sagemath.org/22674
      Reported by: jmantysalo
      Ticket author(s): Jori Mäntysalo
      Reviewer(s): Travis Scrimshaw
    • Release Manager's avatar
      Trac #22877: Wrong atan2 of complex arguments · dd7d64f7
      Release Manager authored
      sage: atan2(CC(I), CC(I+1))
      sage: atan2(I, I+1)
      arctan2(I, I + 1)
      sage: atan2(CBF(I), CBF(I+1))
      /home/ralf/sage/src/sage/libs/pynac/pynac.pyx in
         1798         P = RR
         1799     if y != 0:
      -> 1800         if x > 0:
         1801             res = py_atan(abs(y/x))
         1802         elif x < 0:
      TypeError: No order is defined for ComplexBalls.
      But both !SymPy and Wolfram Alpha use the form `atan2(y,x) = -I*log((x +
      I*y)/sqrt(x^2 + y^2))` for complex `x,y`:
      In [18]: atan2(I,I+1)
            ⎛        ⅈ         ⎞
            ⎜   _______________⎟
            ⎜  ╱             2 ⎟
            ⎝╲╱  -1 + (1 + ⅈ)  ⎠
      In [19]: _.n()
      Out[19]: 0.553574358897045 + 0.402359478108525⋅ⅈ
      which is `arctan(1/2*I + 1/2)`.
      (Wolfram reverses the argument and so one must input `arctan(I+1,I)`
      URL: https://trac.sagemath.org/22877
      Reported by: rws
      Ticket author(s): Ralf Stephan
      Reviewer(s): Travis Scrimshaw
    • Frédéric Chapoton's avatar
      trac 21668 change in doc · 1652bef0
      Frédéric Chapoton authored
  6. 09 May, 2017 5 commits
  7. 08 May, 2017 5 commits
  8. 07 May, 2017 3 commits
  9. 06 May, 2017 11 commits
    • Release Manager's avatar
      Trac #22923: Fix documentation regarding cached functions in the Steenrod algebra code · 4ee61312
      Release Manager authored
      The old ticket #11115 made some changes to caching in the Steenrod
      algebra code and fixed some of the docstrings and comments, but missed a
      few other docstrings and comments. We should fix the remaining cases.
      URL: https://trac.sagemath.org/22923
      Reported by: jhpalmieri
      Ticket author(s): John Palmieri
      Reviewer(s): Travis Scrimshaw
    • Release Manager's avatar
      Trac #22940: another typo · 643ded57
      Release Manager authored
      sequel of #19452, that was not taken care of
      URL: https://trac.sagemath.org/22940
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
    • Release Manager's avatar
      Trac #22925: Fix Cython interface to Pynac's find_function · c2e84e26
      Release Manager authored
      There is ancient code in `pynac.pxd` that causes failures with Pynac dev
      versions. Especially the construct `except +ValueError` doesn't work as
      apparently assumed.
      URL: https://trac.sagemath.org/22925
      Reported by: rws
      Ticket author(s): Ralf Stephan
      Reviewer(s): Travis Scrimshaw
    • Release Manager's avatar
      Trac #22911: Reorganize some methods for loops · 7aa9ec8d
      Release Manager authored
      We have 2 methods for returning the loops of a (di)graph, `loops` and
      `loop_edges`, and one is faster than the other.
      sage: G = Graph(10, loops=True)
      sage: G.add_edges([(u,u) for u in G])
      sage: %time L1 = G.loop_edges()
      CPU times: user 68 µs, sys: 23 µs, total: 91 µs
      Wall time: 73 µs
      sage: %time L2 = G.loops()
      CPU times: user 181 µs, sys: 50 µs, total: 231 µs
      Wall time: 194 µs
      sage: L1 == L2
      sage: D = digraphs.DeBruijn(10,1)
      sage: %time L1 = D.loop_edges()
      CPU times: user 80 µs, sys: 18 µs, total: 98 µs
      Wall time: 86.1 µs
      sage: %time L2 = D.loops()
      CPU times: user 333 µs, sys: 76 µs, total: 409 µs
      Wall time: 344 µs
      sage: L1 == L2
      Note however that the slower (`loops`) has an extra parameter for edge
      labels. Let's try to clean that.
      URL: https://trac.sagemath.org/22911
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Travis Scrimshaw
    • Release Manager's avatar
      Trac #22906: improve add_clique to allow various iterable container · 3d17975d
      Release Manager authored
      Enable the `add_clique` method to accept any kind of iterable container
      of vertices rather than only an object of type `list`.
      URL: https://trac.sagemath.org/22906
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Frédéric Chapoton
    • Release Manager's avatar
      Trac #22950: combinat/posets/posets.py fails when the optional package dot2tex is installed · 21e33f79
      Release Manager authored
      As reported at https://groups.google.com/d/msg/sage-
      release/UdllnAJFufA/-e8ArqwFBAAJ there is often a failure when
      testing `combinat/posets/posets.py`
      sage -t --long src/sage/combinat/posets/posets.py
      File "src/sage/combinat/posets/posets.py", line 1742, in
      Failed example:
          L.plot(figsize=12, border=True, element_shape='s',
                 element_size=400, element_color='white',
                 element_colors={'blue': F, 'green': L.double_irreducibles()},
                 cover_color='lightgray', cover_colors={'black': F_internal},
                 title='The Frattini\nsublattice in blue', fontsize=10)
      Exception raised:
          Traceback (most recent call last):
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/doctest/forker.py", line 509, in _run
              self.compile_and_execute(example, compiler, test.globs)
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/doctest/forker.py", line 872, in compile_and_execute
              exec(compiled, globs)
            File "<doctest sage.combinat.posets.posets.FinitePoset.?[12]>",
      line 5, in <module>
              title='The Frattini\nsublattice in blue', fontsize=Integer(10))
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/combinat/posets/posets.py", line 1834, in plot
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/misc/decorators.py", line 564, in wrapper
              return func(*args, **options)
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/graphs/generic_graph.py", line 18733, in plot
              return self.graphplot(**options).plot()
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/graphs/generic_graph.py", line 18384, in graphplot
              return GraphPlot(graph=self, options=options)
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/graphs/graph_plot.py", line 262, in __init__
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/graphs/graph_plot.py", line 346, in set_pos
              self._pos = self._graph.layout(**self._options)
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/graphs/generic_graph.py", line 17847, in layout
              pos = getattr(self, "layout_%s"%layout)(dim = dim, **options)
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/graphs/digraph.py", line 2915, in layout_acyclic
              return self.layout_graphviz(rankdir=rankdir, **options)
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/graphs/generic_graph.py", line 18315, in layout_graphviz
              positions = dot2tex.dot2tex(self.graphviz_string(**options),
      format = "positions", prog = prog)
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/misc/decorators.py", line 564, in wrapper
              return func(*args, **options)
            File "/usr/local/sage-8/local/lib/python2.7/site-
      packages/sage/graphs/generic_graph.py", line 19532, in graphviz_string
              "%s is not a valid format for edge"%(edge)
          AssertionError: [0, 4] is not a valid format for edge
      The failure occurs because `graphviz_string` does not allow edges to be
      given as lists (exposed by #18545).
      URL: https://trac.sagemath.org/22950
      Reported by: strogdon
      Ticket author(s): Travis Scrimshaw
      Reviewer(s): Jori Mäntysalo
    • Release Manager's avatar
      Trac #22948: avoid "absolute_import" in tab completion · b2387206
      Release Manager authored
      As reported in [[https://groups.google.com/forum/#!topic/sage-devel
      /XksZ-oCVrOo|this thread on sage-devel]]
      sage: designs.<TAB>
      absolute_import ...
      URL: https://trac.sagemath.org/22948
      Reported by: vdelecroix
      Ticket author(s): Vincent Delecroix
      Reviewer(s): David Coudert
    • Release Manager's avatar
      Trac #22943: Speedup rigged configuration bijection in type B · ef9d7e00
      Release Manager authored
      We don't need to generate all module generators of the tensor product of
      KR crystals in type B as we just need a placeholder element. Generating
      all of these takes a significant amount of time, so we should just
      create a simple placeholder element.
      URL: https://trac.sagemath.org/22943
      Reported by: tscrim
      Ticket author(s): Travis Scrimshaw
      Reviewer(s): Ben Salisbury
    • Release Manager's avatar
      Trac #22938: Polytopes normaliz backend doesn't handle a polytope with a trivial integral hull · 5918bf2f
      Release Manager authored
      Here is an example that is not handled properly:
      sage: ieqs = [[1, 2, -1, 0], [0, -1, 2, -1], [0, 0, -1, 2], [0, -1, 0,
      0], [0, 0, -1, 0],
      ....: [0, 0, 0, -1], [-1, -1, -1, -1], [1, 1, 0, 0], [1, 0, 1, 0], [1,
      0, 0, 1]]
      sage: P = Polyhedron(ieqs=ieqs, backend='normaliz')
      sage: P.bounding_box()
      ((-3/4, -1/2, -1/4), (-1/2, -1/4, 0))
      sage: P.bounding_box(integral_hull=True)
      (None, None)
      sage: P.integral_points()
      TypeError                                 Traceback (most recent call
      <ipython-input-17-2abbf2adff15> in <module>()
      ----> 1 P.integral_points()
      packages/sage/geometry/polyhedron/backend_normaliz.pyc in
      integral_points(self, threshold)
          568         if threshold > 1:
          569             box_min, box_max =
      --> 570             box_points = prod(max_coord-min_coord+1 for
      min_coord, max_coord in zip(box_min, box_max))
          571             if  box_points<threshold:
          572                 from sage.geometry.integral_points import
      TypeError: zip argument #1 must support iteration
      URL: https://trac.sagemath.org/22938
      Reported by: tscrim
      Ticket author(s): Travis Scrimshaw
      Reviewer(s): Matthias Koeppe
    • Release Manager's avatar
      Trac #22933: clean up deprecations in sandpile · 437154da
      Release Manager authored
      Some deprecation in sandpile are in fact already removed, but still
      present in lazy imports. This breaks ups `vars()` and `locals()`.
      Namely, these are `grid_sandpile` and `complete_sandpile`.
      In fact, we should clean up everything that was deprecated in #18618.
      However, we leave `sandlib` in the code, only remove it from the global
      namespace, as e.g. `sandlib('gor')` does not have an equivalent.
      Also, it turns out that while calling `vars()` directly still fails, one
      now can at least do
      for k in v.keys(): print v[k]
      URL: https://trac.sagemath.org/22933
      Reported by: dimpase
      Ticket author(s): Dima Pasechnik
      Reviewer(s): John Palmieri
    • Release Manager's avatar
      Trac #22932: py3: remove one call to unicode in src/sage_setup/docbuild/__init__.py · c00fe010
      Release Manager authored
      tiny part of #16079
      URL: https://trac.sagemath.org/22932
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): John Palmieri