Compare commits

..

No commits in common. "c8-beta" and "imports/c9/python3.11-scipy-1.10.0-1.el9" have entirely different histories.

5 changed files with 102 additions and 93 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/scipy-1.10.1.tar.gz SOURCES/scipy-1.10.0.tar.gz

View File

@ -1 +1 @@
ff83163396a70276c0441b541befc485b471b27b SOURCES/scipy-1.10.1.tar.gz 8094557cc6c2d2ec32faf2a9b33ed41b3a8acecc SOURCES/scipy-1.10.0.tar.gz

View File

@ -0,0 +1,93 @@
diff --git a/scipy/sparse/linalg/_isolve/tests/test_iterative.py b/scipy/sparse/linalg/_isolve/tests/test_iterative.py
index a782a8d27c2..48fc16b7a00 100644
--- a/scipy/sparse/linalg/_isolve/tests/test_iterative.py
+++ b/scipy/sparse/linalg/_isolve/tests/test_iterative.py
@@ -409,7 +409,9 @@ def test_atol(solver):
residual = A.dot(x) - b
err = np.linalg.norm(residual)
atol2 = tol * b_norm
- assert_(err <= max(atol, atol2))
+ # Added 1.00025 fudge factor because of `err` exceeding `atol` just
+ # very slightly on s390x (see gh-17839)
+ assert_(err <= 1.00025 * max(atol, atol2))
@pytest.mark.parametrize("solver", [cg, cgs, bicg, bicgstab, gmres, qmr, minres, lgmres, gcrotmk, tfqmr])
@@ -452,8 +454,10 @@ def test_zero_rhs(solver):
and sys.version_info[1] == 9,
reason="gh-13019")),
qmr,
- pytest.param(lgmres, marks=pytest.mark.xfail(platform.machine() == 'ppc64le',
- reason="fails on ppc64le")),
+ pytest.param(lgmres, marks=pytest.mark.xfail(
+ platform.machine() not in ['x86_64' 'x86', 'aarch64', 'arm64'],
+ reason="fails on at least ppc64le, ppc64 and riscv64, see gh-17839")
+ ),
pytest.param(cgs, marks=pytest.mark.xfail),
pytest.param(bicg, marks=pytest.mark.xfail),
pytest.param(bicgstab, marks=pytest.mark.xfail),
diff --git a/scipy/special/tests/test_orthogonal.py b/scipy/special/tests/test_orthogonal.py
index a325cb1a9ef..408b03bde2e 100644
--- a/scipy/special/tests/test_orthogonal.py
+++ b/scipy/special/tests/test_orthogonal.py
@@ -546,7 +546,7 @@ def test_roots_gegenbauer():
vgq(rootf(170), evalf(170), weightf(170), -1., 1., 5, atol=1e-13)
vgq(rootf(170), evalf(170), weightf(170), -1., 1., 25, atol=1e-12)
vgq(rootf(170), evalf(170), weightf(170), -1., 1., 100, atol=1e-11)
- vgq(rootf(170.5), evalf(170.5), weightf(170.5), -1., 1., 5, atol=1e-13)
+ vgq(rootf(170.5), evalf(170.5), weightf(170.5), -1., 1., 5, atol=1.25e-13)
vgq(rootf(170.5), evalf(170.5), weightf(170.5), -1., 1., 25, atol=1e-12)
vgq(rootf(170.5), evalf(170.5), weightf(170.5), -1., 1., 100, atol=1e-11)
diff --git a/scipy/stats/tests/test_distributions.py b/scipy/stats/tests/test_distributions.py
index eceeafdffe0..139b0537174 100644
--- a/scipy/stats/tests/test_distributions.py
+++ b/scipy/stats/tests/test_distributions.py
@@ -4254,7 +4254,7 @@ def test_pdf_nolan_samples(
],
# for small alpha very slightly reduced accuracy
[
- 'piecewise', 5e-11, lambda r: (
+ 'piecewise', 2.5e-10, lambda r: (
np.isin(r['pct'], pct_range) &
np.isin(r['alpha'], alpha_range) &
np.isin(r['beta'], beta_range) &
@@ -4358,7 +4358,7 @@ def test_cdf_nolan_samples(
tests = [
# piecewise generally good accuracy
[
- 'piecewise', 1e-12, lambda r: (
+ 'piecewise', 2e-12, lambda r: (
np.isin(r['pct'], pct_range) &
np.isin(r['alpha'], alpha_range) &
np.isin(r['beta'], beta_range) &
@@ -4480,6 +4480,14 @@ def test_location_scale(
):
"""Tests for pdf and cdf where loc, scale are different from 0, 1
"""
+
+ uname = platform.uname()
+ is_linux_32 = uname.system == 'Linux' and "32bit" in platform.architecture()[0]
+ # Test seems to be unstable (see gh-17839 for a bug report on Debian
+ # i386), so skip it.
+ if is_linux_32 and case == 'pdf':
+ pytest.skip("Test unstable on some platforms; see gh-17839, 17859")
+
data = nolan_loc_scale_sample_data
# We only test against piecewise as location/scale transforms
# are same for other methods.
diff --git a/scipy/stats/tests/test_mstats_basic.py b/scipy/stats/tests/test_mstats_basic.py
index cd53c7b7914..76cbfd8c253 100644
--- a/scipy/stats/tests/test_mstats_basic.py
+++ b/scipy/stats/tests/test_mstats_basic.py
@@ -1768,8 +1768,8 @@ def test_skewtest_2D_WithMask(self):
r = stats.skewtest(x)
rm = stats.mstats.skewtest(xm)
- assert_allclose(r[0][0], rm[0][0], rtol=2e-15)
- assert_allclose(r[0][1], rm[0][1], rtol=1e-15)
+ assert_allclose(r[0][0], rm[0][0], rtol=1e-14)
+ assert_allclose(r[0][1], rm[0][1], rtol=1e-14)
def test_normaltest(self):
with np.errstate(over='raise'), suppress_warnings() as sup:

View File

@ -1,53 +0,0 @@
From 9b068e5a68d9efd9c2403e9499b2c381b6c1d3a6 Mon Sep 17 00:00:00 2001
From: Matt Haberland <mhaberla@calpoly.edu>
Date: Fri, 21 Apr 2023 07:07:41 -0700
Subject: [PATCH 1/2] MAINT: optimize: fix test_milp_timeout
---
scipy/optimize/tests/test_milp.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/scipy/optimize/tests/test_milp.py b/scipy/optimize/tests/test_milp.py
index 51996642..1f60fce3 100644
--- a/scipy/optimize/tests/test_milp.py
+++ b/scipy/optimize/tests/test_milp.py
@@ -279,9 +279,7 @@ _msg_iter = "Iteration limit reached. (HiGHS Status 14:"
@pytest.mark.skipif(np.intp(0).itemsize < 8,
reason="Unhandled 32-bit GCC FP bug")
-@pytest.mark.slow
-@pytest.mark.timeout(360)
-@pytest.mark.parametrize(["options", "msg"], [({"time_limit": 10}, _msg_time),
+@pytest.mark.parametrize(["options", "msg"], [({"time_limit": 0.1}, _msg_time),
({"node_limit": 1}, _msg_iter)])
def test_milp_timeout_16545(options, msg):
# Ensure solution is not thrown away if MILP solver times out
--
2.40.0
From 024568a4f4292e7b22643f40ae61d33d273cf674 Mon Sep 17 00:00:00 2001
From: Matt Haberland <mhaberla@calpoly.edu>
Date: Sat, 22 Apr 2023 15:43:07 -0700
Subject: [PATCH 2/2] Update scipy/optimize/tests/test_milp.py
[skip ci]
---
scipy/optimize/tests/test_milp.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/scipy/optimize/tests/test_milp.py b/scipy/optimize/tests/test_milp.py
index 1f60fce3..42dae29a 100644
--- a/scipy/optimize/tests/test_milp.py
+++ b/scipy/optimize/tests/test_milp.py
@@ -279,6 +279,7 @@ _msg_iter = "Iteration limit reached. (HiGHS Status 14:"
@pytest.mark.skipif(np.intp(0).itemsize < 8,
reason="Unhandled 32-bit GCC FP bug")
+@pytest.mark.slow
@pytest.mark.parametrize(["options", "msg"], [({"time_limit": 0.1}, _msg_time),
({"node_limit": 1}, _msg_iter)])
def test_milp_timeout_16545(options, msg):
--
2.40.0

View File

@ -21,8 +21,8 @@
Summary: Scientific Tools for Python Summary: Scientific Tools for Python
Name: python%{python3_pkgversion}-scipy Name: python%{python3_pkgversion}-scipy
Version: 1.10.1 Version: 1.10.0
Release: 2%{?dist} Release: 1%{?dist}
# BSD -- whole package except: # BSD -- whole package except:
# Boost -- scipy/special/cephes/scipy_iv.c # Boost -- scipy/special/cephes/scipy_iv.c
@ -31,10 +31,10 @@ License: BSD and Boost and Public Domain
Url: http://www.scipy.org/scipylib/index.html Url: http://www.scipy.org/scipylib/index.html
Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
# Fix some test failures on 32 bits
# Fix test_milp_timeout failure # https://github.com/scipy/scipy/pull/17859
# Resolved upstream: https://github.com/scipy/scipy/pull/18339 # https://github.com/scipy/scipy/pull/17931
Patch0: fix_test_milp_timeout.patch Patch0: fix-32bit-test-failures.patch
BuildRequires: fftw-devel, suitesparse-devel BuildRequires: fftw-devel, suitesparse-devel
BuildRequires: %{blaslib}-devel BuildRequires: %{blaslib}-devel
@ -144,32 +144,7 @@ not test_concatenate_int32_overflow'"
# Those tests fail on koji/brew for ppc64le but pass # Those tests fail on koji/brew for ppc64le but pass
# locally for that architecture # locally for that architecture
SKIP_PPC64LE="-k '$SKIP_ALL_ARCHS and \ SKIP_PPC64LE="-k '$SKIP_ALL_ARCHS'"
not TestFFTConvolve and \
not TestDoubleFFT and \
not TestSingleFFT and \
not TestDoubleIFFT and \
not TestSingleIFFT and \
not test_tpsv and \
not TestLinear and \
not test_various_drivers_standard and \
not test_Mx1_economic and \
not test_hegst and \
not test_tpqrt_tpmqrt and \
not test_pteqr and \
not test_pptrs_pptri_pptrf_ppsv_ppcon and \
not test_against_numpy_convolve and \
not test_convolve_method and \
not test_rank1 and \
not test_splu_smoketest and \
not test_spilu_smoketest and \
not test_threads_parallel and \
not test_hermitian and \
not test_convergence and \
not test_precond_dummy and \
not test_x0_equals_Mb and \
not test_svdp and \
not test_examples'"
# https://bugzilla.redhat.com/show_bug.cgi?id=1959353 # https://bugzilla.redhat.com/show_bug.cgi?id=1959353
SKIP_S390X="-k '$SKIP_ALL_ARCHS and \ SKIP_S390X="-k '$SKIP_ALL_ARCHS and \
@ -243,12 +218,6 @@ popd
%{python3_sitearch}/*.egg-info %{python3_sitearch}/*.egg-info
%changelog %changelog
* Wed May 10 2023 Charalampos Stratakis <cstratak@redhat.com> - 1.10.1-2
- Fix test_milp_timeout failure
* Tue May 02 2023 Ryan Erickson <rerickso@redhat.com> - 1.10.1-1
- Update to 1.10.1
* Sun Feb 19 2023 Charalampos Stratakis <cstratak@redhat.com> - 1.10.0-1 * Sun Feb 19 2023 Charalampos Stratakis <cstratak@redhat.com> - 1.10.0-1
- Update to 1.10.0 - Update to 1.10.0