Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random doctest failure in sage.plot.matrix_plot #33154

Closed
tornaria opened this issue Jan 12, 2022 · 8 comments
Closed

random doctest failure in sage.plot.matrix_plot #33154

tornaria opened this issue Jan 12, 2022 · 8 comments

Comments

@tornaria
Copy link
Contributor

sage -t --long --random-seed=77574003112252338109572980105396911878 src/sage/plot/matrix_plot.py
**********************************************************************
File "src/sage/plot/matrix_plot.py", line 518, in sage.plot.matrix_plot.matrix_plot
Failed example:
    matrix_plot(random_matrix(P, 3, 3))
Expected:
    Traceback (most recent call last):
    ...
    TypeError: cannot convert nonconstant polynomial
Got:
    Graphics object consisting of 1 graphics primitive
**********************************************************************
1 item had failures:
   1 of  50 in sage.plot.matrix_plot.matrix_plot
    [71 tests, 1 failure, 11.28 s]
----------------------------------------------------------------------

I guess if one is really (un)lucky, the polynomial matrix is really constant. Indeed changing matrix_plot() for print() I get:

sage -t --random-seed=77574003112252338109572980105396911878 src/sage/plot/matrix_plot.py
**********************************************************************
File "src/sage/plot/matrix_plot.py", line 518, in sage.plot.matrix_plot.matrix_plot
Failed example:
    print(random_matrix(P, 3, 3))
Expected:
    Traceback (most recent call last):
    ...
    TypeError: cannot convert nonconstant polynomial
Got:
    [                 0  0.782649657440611                  0]
    [ 0.963470417368214 -0.498443274186489                  0]
    [                 0  0.419385875878395                  0]
**********************************************************************

Of course most random seeds yield nonconstant matrices so I was really lucky here...

Component: doctest coverage

Author: Michael Orlitzky

Branch/Commit: 553e115

Reviewer: Markus Wageringel

Issue created by migration from https://trac.sagemath.org/ticket/33154

@tornaria tornaria added this to the sage-9.5 milestone Jan 12, 2022
@orlitzky
Copy link
Contributor

New commits:

553e115Trac #33154: fix random failure in sage.plot.matrix_plot.

@orlitzky
Copy link
Contributor

Author: Michael Orlitzky

@orlitzky
Copy link
Contributor

Commit: 553e115

@orlitzky
Copy link
Contributor

Branch: u/mjo/ticket/33154

@mwageringel
Copy link

comment:2

Ok, LGTM.

@mwageringel
Copy link

Reviewer: Markus Wageringel

@slel
Copy link
Member

slel commented Jan 30, 2022

comment:3

Setting milestone to 9.6 now that 9.5 is out.

@slel slel modified the milestones: sage-9.5, sage-9.6 Jan 30, 2022
@vbraun
Copy link
Member

vbraun commented Feb 13, 2022

Changed branch from u/mjo/ticket/33154 to 553e115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants