Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: special: Fix two XSLOW test failures. (scipy#17190)
When SCIPY_XSLOW is defined, the tests `test_riemann_zeta` and `test_zetac` (that compare the results of `zeta` and `zetac` to the results computed with `mpmath`) are run with 5000 points, and it turns out that the input value 1 is included in that case. The SciPy functions returns `inf`, but `mpmath.zeta(1)` raises an exception, and that caused the tests to fail. The fix is to wrap the `mpmath` function to return `mpmath.inf` when the input is 1. After fixing that, both tests then failed because some inputs result in a relative error of roughly 2e-13, so I bumped the tolerance up to 5e-13.
- Loading branch information