Commit 287c8b4
Release Manager
gh-40761: 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.
This does not fix the underlying problem that `detect_poles="show"` is
non-deterministic, and rather simplistic. I have opened
#40760 to track that.
### Fixes
* #33129
* #34772
* #35470
URL: #40761
Reported by: Michael Orlitzky
Reviewer(s):File tree
3 files changed
+5
-5
lines changed- build/pkgs/configure
- src/sage/plot
3 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 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