Commit 4bdd99e
committed
src/sage/plot/plot.py: fix random test failure
One test in this file can fail because the wrong number of graphics
primitives are rendered. The test is using detect_poles="show", which
detects poles using a slope tolerance for jumps from negative to
positive, or vice-versa. The function in question has a jump from
negative to positive, and the problem arises when our plot points are
randomly generated close enough to the jump that it looks like a pole.
The extra graphics primitive is a rendering of the "pole."
To fix it, we change the domain of the plot to exclude the jump from
negative to positive. There are still jumps around points that have
been excluded from the plot, and at least one pole is still shown,
so the purpose of the test has not been defeated.1 parent 4cdd703 commit 4bdd99e
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1854 | 1854 | | |
1855 | 1855 | | |
1856 | 1856 | | |
1857 | | - | |
| 1857 | + | |
1858 | 1858 | | |
1859 | | - | |
| 1859 | + | |
1860 | 1860 | | |
1861 | 1861 | | |
1862 | 1862 | | |
| |||
0 commit comments