Ask Your Question

deinst's profile - activity

2023-10-31 12:07:27 +0200 received badge  Famous Question (source)
2023-06-28 18:20:29 +0200 marked best answer Doctest doesn't find new function

I thought that I would fix gihub bug #22313 (Implement Euler Polynomials)

So I added a function (boiled down, the implementation here is obviously incorrect)

def euler_polynomial(x, n):
    r"""
    Compute the value of the ``n``-th Euler polynomial at ``x``.

    TESTS::

        sage: y=QQ['y'].gen()
        sage: euler_polynomial(y, 0)
        1
    """
    return 1

Now if I run ./sage -t src/sage/combinat/combinat.py I get

[...]
      File "<doctest sage.combinat.combinat.euler_polynomial[1]>", line 1, in <module>
        euler_polynomial(y, Integer(0))
        ^^^^^^^^^^^^^^^^
    NameError: name 'euler_polynomial' is not defined
**********************************************************************
1 item had failures:
   1 of   3 in sage.combinat.combinat.euler_polynomial
    [462 tests, 1 failure, 2.38 s]

I am obviously doing something wrong, but am at a loss as to what. I have tried rebuilding sage.

2023-06-28 17:59:25 +0200 asked a question Doctest doesn't find new function

Doctest doesn't find new function I thought that I would fix gihub bug #22313 (Implement Euler Polynomials) So I added

2020-11-30 17:09:01 +0200 received badge  Notable Question (source)
2020-04-14 20:40:13 +0200 received badge  Popular Question (source)
2018-07-11 20:12:00 +0200 received badge  Nice Question (source)
2018-07-11 18:51:45 +0200 commented answer graph vertex labelling

Thanks. I had looked at the matplotlib page, but had not expected that '_' or '|' would do what I wanted.

2018-07-11 18:49:13 +0200 received badge  Scholar (source)
2018-07-11 13:36:12 +0200 received badge  Supporter (source)
2018-07-11 09:17:46 +0200 received badge  Student (source)
2018-07-10 20:39:54 +0200 received badge  Editor (source)
2018-07-10 20:19:28 +0200 asked a question graph vertex labelling

I have a graph (poset actually) that has a rational function labelling each vertex. I would like to show just the edges and the vertex labels. If I try to set vertex_shape='None' I get a crash deep in matplotlib. If I try anything else I get the marker symbol printed over the label. For example

  P = RootSystem(['A',3]).root_poset()
  P.show(vertex_color='white')

Will show the graph with circles over the labels. If I shrink the labels, then the edges cover the labels. If I do

  P = RootSystem(['A',3]).root_poset()
  P.show(vertex_color='white', vertex_shape='None')

there is a strange crash.