From 7cc32c43e7c52d04768cda11a1b7040aeb7f9536 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Sat, 27 Mar 2021 09:57:56 -0600 Subject: [PATCH 01/13] REL: prep for SciPy 1.6.3 --- doc/release/1.6.3-notes.rst | 20 ++++++++++++++++++++ doc/source/release.1.6.3.rst | 1 + doc/source/release.rst | 1 + pavement.py | 4 ++-- setup.py | 4 ++-- 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 doc/release/1.6.3-notes.rst create mode 100644 doc/source/release.1.6.3.rst diff --git a/doc/release/1.6.3-notes.rst b/doc/release/1.6.3-notes.rst new file mode 100644 index 000000000000..e1be59ee560d --- /dev/null +++ b/doc/release/1.6.3-notes.rst @@ -0,0 +1,20 @@ +========================== +SciPy 1.6.3 Release Notes +========================== + +.. contents:: + +SciPy 1.6.3 is a bug-fix release with no new features +compared to 1.6.2. + +Authors +======= + + +Issues closed for 1.6.3 +----------------------- + + +Pull requests for 1.6.3 +----------------------- + diff --git a/doc/source/release.1.6.3.rst b/doc/source/release.1.6.3.rst new file mode 100644 index 000000000000..3797b8fe5e8b --- /dev/null +++ b/doc/source/release.1.6.3.rst @@ -0,0 +1 @@ +.. include:: ../release/1.6.3-notes.rst diff --git a/doc/source/release.rst b/doc/source/release.rst index 8caf647b86a8..e89d137457d2 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -5,6 +5,7 @@ Release Notes .. toctree:: :maxdepth: 1 + release.1.6.3 release.1.6.2 release.1.6.1 release.1.6.0 diff --git a/pavement.py b/pavement.py index f63f185cb5dc..a4706e220343 100644 --- a/pavement.py +++ b/pavement.py @@ -69,10 +69,10 @@ #----------------------------------- # Source of the release notes -RELEASE = 'doc/release/1.6.2-notes.rst' +RELEASE = 'doc/release/1.6.3-notes.rst' # Start/end of the log (from git) -LOG_START = 'v1.6.1' +LOG_START = 'v1.6.2' LOG_END = 'maintenance/1.6.x' diff --git a/setup.py b/setup.py index cedb210ad827..bef17e791ec8 100755 --- a/setup.py +++ b/setup.py @@ -55,8 +55,8 @@ MAJOR = 1 MINOR = 6 -MICRO = 2 -ISRELEASED = True +MICRO = 3 +ISRELEASED = False IS_RELEASE_BRANCH = True VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) From 8f41ce89d58b0bb9921b48fd556b75802dc5c83c Mon Sep 17 00:00:00 2001 From: Peter Bell Date: Tue, 30 Mar 2021 22:54:14 +0100 Subject: [PATCH 02/13] BUG: Divide by zero in yule dissimilarity of identical vectors --- scipy/spatial/distance.py | 6 +++++- scipy/spatial/src/distance_impl.h | 6 +++++- scipy/spatial/tests/test_distance.py | 12 ++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/scipy/spatial/distance.py b/scipy/spatial/distance.py index 9a88a721ac46..76f19ba13a7d 100644 --- a/scipy/spatial/distance.py +++ b/scipy/spatial/distance.py @@ -1344,7 +1344,11 @@ def yule(u, v, w=None): if w is not None: w = _validate_weights(w) (nff, nft, ntf, ntt) = _nbool_correspond_all(u, v, w=w) - return float(2.0 * ntf * nft / np.array(ntt * nff + ntf * nft)) + half_R = ntf * nft + if half_R == 0: + return 0.0 + else: + return float(2.0 * half_R / (ntt * nff + half_R)) @np.deprecate(message="spatial.distance.matching is deprecated in scipy 1.0.0; " diff --git a/scipy/spatial/src/distance_impl.h b/scipy/spatial/src/distance_impl.h index 7927cfa903ea..d2c9a3077686 100644 --- a/scipy/spatial/src/distance_impl.h +++ b/scipy/spatial/src/distance_impl.h @@ -222,7 +222,11 @@ yule_distance_char(const char *u, const char *v, const npy_intp n) nft += (!x) & y; } nff = n - ntt - ntf - nft; - return (2. * ntf * nft) / ((double)ntt * nff + (double)ntf * nft); + double half_R = (double)ntf * nft; + if (half_R == 0.0) { + return 0.0; + } + return (2. * half_R) / ((double)ntt * nff + half_R); } static NPY_INLINE double diff --git a/scipy/spatial/tests/test_distance.py b/scipy/spatial/tests/test_distance.py index 2ff5f867d4f4..3e1021928fb7 100644 --- a/scipy/spatial/tests/test_distance.py +++ b/scipy/spatial/tests/test_distance.py @@ -2130,3 +2130,15 @@ def test__validate_vector(): x = [[1, 2], [3, 4]] assert_raises(ValueError, _validate_vector, x) + +def test_yule_all_same(): + # Test yule avoids a divide by zero when exactly equal + x = np.ones((2, 6), dtype=bool) + d = wyule(x[0], x[0]) + assert d == 0.0 + + d = pdist(x, 'yule') + assert_equal(d, [0.0]) + + d = cdist(x[:1], x[:1], 'yule') + assert_equal(d, [[0.0]]) From 7286f7d0a8e8e4a639e7c8e170dc433fbdd8041e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=98=9F=E9=9B=A8?= Date: Wed, 7 Apr 2021 10:31:46 +0800 Subject: [PATCH 03/13] substitute np.math.factorial with math.factorial --- scipy/stats/mstats_basic.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scipy/stats/mstats_basic.py b/scipy/stats/mstats_basic.py index 48c64c870464..45d495c4d329 100644 --- a/scipy/stats/mstats_basic.py +++ b/scipy/stats/mstats_basic.py @@ -34,6 +34,7 @@ from numpy import ndarray import numpy.ma as ma from numpy.ma import masked, nomask +import math import itertools import warnings @@ -544,9 +545,9 @@ def _kendall_p_exact(n, c): elif n == 2: prob = 1.0 elif c == 0: - prob = 2.0/np.math.factorial(n) if n < 171 else 0.0 + prob = 2.0/math.factorial(n) if n < 171 else 0.0 elif c == 1: - prob = 2.0/np.math.factorial(n-1) if n < 172 else 0.0 + prob = 2.0/math.factorial(n-1) if n < 172 else 0.0 elif 4*c == n*(n-1): prob = 1.0 elif n < 171: @@ -556,7 +557,7 @@ def _kendall_p_exact(n, c): new = np.cumsum(new) if j <= c: new[j:] -= new[:c+1-j] - prob = 2.0*np.sum(new)/np.math.factorial(n) + prob = 2.0*np.sum(new)/math.factorial(n) else: new = np.zeros(c+1) new[0:2] = 1.0 From df737f5fb9217c4583d42b5f41098d704e99cb8f Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Fri, 9 Apr 2021 16:56:58 -0600 Subject: [PATCH 04/13] DOC: update 1.6.3 relnotes * update SciPy `1.6.3` release notes following a set of backports --- doc/release/1.6.3-notes.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/release/1.6.3-notes.rst b/doc/release/1.6.3-notes.rst index e1be59ee560d..ab885c93b8f4 100644 --- a/doc/release/1.6.3-notes.rst +++ b/doc/release/1.6.3-notes.rst @@ -10,11 +10,22 @@ compared to 1.6.2. Authors ======= +* Peter Bell +* Tyler Reddy +* 刘星雨 + + +A total of 3 people contributed to this release. +People with a "+" by their names contributed a patch for the first time. +This list of names is automatically generated, and may not be fully complete. Issues closed for 1.6.3 ----------------------- +* `#13772 `__: Divide by zero in distance.yule + Pull requests for 1.6.3 ----------------------- +* `#13773 `__: BUG: Divide by zero in yule dissimilarity of constant vectors +* `#13819 `__: substitute np.math.factorial with math.factorial From 660bcf1b8d0373de535e6c123d238bc990a6e786 Mon Sep 17 00:00:00 2001 From: Tirth Patel Date: Sat, 27 Mar 2021 16:39:48 +0530 Subject: [PATCH 05/13] DOC: fix the matplotlib warning emitted during builing docs Reviewed in gh-13755 --- doc/source/tutorial/special.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/source/tutorial/special.rst b/doc/source/tutorial/special.rst index 201ea9eebe64..30ec5ea7525a 100644 --- a/doc/source/tutorial/special.rst +++ b/doc/source/tutorial/special.rst @@ -47,10 +47,8 @@ drum head anchored at the edge: >>> z = np.array([drumhead_height(1, 1, r, theta, 0.5) for r in radius]) >>> import matplotlib.pyplot as plt - >>> from mpl_toolkits.mplot3d import Axes3D - >>> from matplotlib import cm >>> fig = plt.figure() - >>> ax = Axes3D(fig, rect=(0, 0.05, 0.95, 0.95)) + >>> ax = fig.add_axes(rect=(0, 0.05, 0.95, 0.95), projection='3d') >>> ax.plot_surface(x, y, z, rstride=1, cstride=1, cmap='RdBu_r', vmin=-0.5, vmax=0.5) >>> ax.set_xlabel('X') >>> ax.set_ylabel('Y') From 1188eb5d5723d679e516b63258d72da9aff5b2f0 Mon Sep 17 00:00:00 2001 From: Pamphile ROY Date: Sun, 4 Apr 2021 11:04:27 +0200 Subject: [PATCH 06/13] MAINT: deprecated np.typeDict --- scipy/ndimage/_ni_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scipy/ndimage/_ni_support.py b/scipy/ndimage/_ni_support.py index 4b69123109c5..e8f39ed540c5 100644 --- a/scipy/ndimage/_ni_support.py +++ b/scipy/ndimage/_ni_support.py @@ -86,7 +86,7 @@ def _get_output(output, input, shape=None, complex_output=False): output = numpy.promote_types(output, numpy.complex64) output = numpy.zeros(shape, dtype=output) elif isinstance(output, str): - output = numpy.typeDict[output] + output = numpy.sctypeDict[output] if complex_output and numpy.dtype(output).kind != 'c': raise RuntimeError("output must have complex dtype") output = numpy.zeros(shape, dtype=output) From 7aaa82661ef6f2297e7048ed742319befed87628 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Sat, 17 Apr 2021 17:32:32 -0600 Subject: [PATCH 07/13] DOC: 1.6.3 release notes update * use English version of name for Xingyu Liu * other updates to the release notes due to additional backports --- doc/release/1.6.3-notes.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/release/1.6.3-notes.rst b/doc/release/1.6.3-notes.rst index ab885c93b8f4..b476685a9679 100644 --- a/doc/release/1.6.3-notes.rst +++ b/doc/release/1.6.3-notes.rst @@ -11,10 +11,12 @@ Authors ======= * Peter Bell +* Tirth Patel * Tyler Reddy -* 刘星雨 + +* Pamphile ROY + +* Xingyu Liu + -A total of 3 people contributed to this release. +A total of 5 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. @@ -22,10 +24,12 @@ Issues closed for 1.6.3 ----------------------- * `#13772 `__: Divide by zero in distance.yule - +* `#13796 `__: CI: prerelease_deps failures Pull requests for 1.6.3 ----------------------- +* `#13755 `__: CI: fix the matplotlib warning emitted during builing docs * `#13773 `__: BUG: Divide by zero in yule dissimilarity of constant vectors +* `#13799 `__: CI/MAINT: deprecated np.typeDict * `#13819 `__: substitute np.math.factorial with math.factorial From e633da1fe5cda108f135a710733a2fa4bc3a9f79 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Sun, 18 Apr 2021 08:28:34 -0600 Subject: [PATCH 08/13] REL: 1.6.3 release commit * set SciPy `1.6.3` `ISRELEASED = True` --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bef17e791ec8..da01442d5ef9 100755 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ MAJOR = 1 MINOR = 6 MICRO = 3 -ISRELEASED = False +ISRELEASED = True IS_RELEASE_BRANCH = True VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) From c0c8da4444b66c9d03e07cf1f2d71ac780349346 Mon Sep 17 00:00:00 2001 From: pmla Date: Mon, 19 Apr 2021 12:16:35 +0200 Subject: [PATCH 09/13] add random seeds --- .../spatial/transform/tests/test_rotation.py | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/scipy/spatial/transform/tests/test_rotation.py b/scipy/spatial/transform/tests/test_rotation.py index 3ff098b38528..c2bfda5643a1 100644 --- a/scipy/spatial/transform/tests/test_rotation.py +++ b/scipy/spatial/transform/tests/test_rotation.py @@ -2,7 +2,7 @@ import numpy as np from numpy.testing import assert_equal, assert_array_almost_equal -from numpy.testing import assert_allclose, assert_array_less +from numpy.testing import assert_allclose from scipy.spatial.transform import Rotation, Slerp from scipy.stats import special_ortho_group from itertools import permutations @@ -701,7 +701,7 @@ def test_inv_single_rotation(): assert_array_almost_equal(res1, eye) assert_array_almost_equal(res2, eye) - x = Rotation.from_quat(np.random.normal(size=(1, 4))) + x = Rotation.from_quat(rnd.normal(size=(1, 4))) y = x.inv() x_matrix = x.as_matrix() @@ -729,7 +729,7 @@ def test_single_identity_magnitude(): def test_identity_invariance(): n = 10 - p = Rotation.random(n) + p = Rotation.random(n, random_state=0) result = p * Rotation.identity(n) assert_array_almost_equal(p.as_quat(), result.as_quat()) @@ -740,7 +740,7 @@ def test_identity_invariance(): def test_single_identity_invariance(): n = 10 - p = Rotation.random(n) + p = Rotation.random(n, random_state=0) result = p * Rotation.identity() assert_array_almost_equal(p.as_quat(), result.as_quat()) @@ -984,7 +984,7 @@ def test_align_vectors_no_rotation(): def test_align_vectors_no_noise(): rnd = np.random.RandomState(0) c = Rotation.from_quat(rnd.normal(size=4)) - b = np.random.normal(size=(5, 3)) + b = rnd.normal(size=(5, 3)) a = c.apply(b) est, rmsd = Rotation.align_vectors(a, b) @@ -1022,14 +1022,14 @@ def test_align_vectors_noise(): rnd = np.random.RandomState(0) n_vectors = 100 rot = Rotation.from_euler('xyz', rnd.normal(size=3)) - vectors = np.random.normal(size=(n_vectors, 3)) + vectors = rnd.normal(size=(n_vectors, 3)) result = rot.apply(vectors) # The paper adds noise as independently distributed angular errors sigma = np.deg2rad(1) tolerance = 1.5 * sigma noise = Rotation.from_rotvec( - np.random.normal( + rnd.normal( size=(n_vectors, 3), scale=sigma ) @@ -1084,11 +1084,12 @@ def test_align_vectors_invalid_input(): def test_random_rotation_shape(): - assert_equal(Rotation.random().as_quat().shape, (4,)) - assert_equal(Rotation.random(None).as_quat().shape, (4,)) + rnd = np.random.RandomState(0) + assert_equal(Rotation.random(random_state=rnd).as_quat().shape, (4,)) + assert_equal(Rotation.random(None, random_state=rnd).as_quat().shape, (4,)) - assert_equal(Rotation.random(1).as_quat().shape, (1, 4)) - assert_equal(Rotation.random(5).as_quat().shape, (5, 4)) + assert_equal(Rotation.random(1, random_state=rnd).as_quat().shape, (1, 4)) + assert_equal(Rotation.random(5, random_state=rnd).as_quat().shape, (5, 4)) def test_slerp(): @@ -1222,8 +1223,8 @@ def test_multiplication_stability(): def test_rotation_within_numpy_array(): - single = Rotation.random() - multiple = Rotation.random(2) + single = Rotation.random(random_state=0) + multiple = Rotation.random(2, random_state=1) array = np.array(single) assert_equal(array.shape, ()) From 6844212d157a99d22af679ceb88fba30f7bceab4 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Tue, 20 Apr 2021 20:37:18 -0600 Subject: [PATCH 10/13] DOC: 1.6.3 relnotes update --- doc/release/1.6.3-notes.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/release/1.6.3-notes.rst b/doc/release/1.6.3-notes.rst index b476685a9679..f96a7e3df42b 100644 --- a/doc/release/1.6.3-notes.rst +++ b/doc/release/1.6.3-notes.rst @@ -11,12 +11,13 @@ Authors ======= * Peter Bell +* Peter Mahler Larsen * Tirth Patel * Tyler Reddy * Pamphile ROY + * Xingyu Liu + -A total of 5 people contributed to this release. +A total of 6 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. @@ -25,6 +26,8 @@ Issues closed for 1.6.3 * `#13772 `__: Divide by zero in distance.yule * `#13796 `__: CI: prerelease_deps failures +* `#13890 `__: TST: spatial rotation failure in (1.6.3) wheels repo (ARM64) + Pull requests for 1.6.3 ----------------------- @@ -33,3 +36,4 @@ Pull requests for 1.6.3 * `#13773 `__: BUG: Divide by zero in yule dissimilarity of constant vectors * `#13799 `__: CI/MAINT: deprecated np.typeDict * `#13819 `__: substitute np.math.factorial with math.factorial +* `#13895 `__: TST: add random seeds in Rotation module From 7db01fba2b95236e5b4adf588d2ce3dac3ead4c8 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Thu, 22 Apr 2021 12:20:13 +0200 Subject: [PATCH 11/13] BENCH: remove benchmark for highs-simplex The high-simplex method of optimize.linprog does not exist in 1.6.x, so this must have been failing for a while or it snuck in during a backport. --- benchmarks/benchmarks/optimize_linprog.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/benchmarks/benchmarks/optimize_linprog.py b/benchmarks/benchmarks/optimize_linprog.py index 5c09f212b7e3..f51ebd84477d 100644 --- a/benchmarks/benchmarks/optimize_linprog.py +++ b/benchmarks/benchmarks/optimize_linprog.py @@ -36,8 +36,7 @@ methods = [("interior-point", {"sparse": True}), ("interior-point", {"sparse": False}), ("revised simplex", {}), - ("highs-ipm", {}), - ("highs-simplex", {})] + ("highs-ipm", {})] rr_methods = [_remove_redundancy_svd, _remove_redundancy_pivot_sparse, _remove_redundancy_pivot_dense, _remove_redundancy_id] presolve_methods = ['sparse', 'dense'] From a2a2ee7cb56b5151bc74c6e8af11a6fba5fea5f2 Mon Sep 17 00:00:00 2001 From: Matt Haberland Date: Mon, 15 Feb 2021 22:25:09 -0800 Subject: [PATCH 12/13] BENCH: optimize: benchmark only HiGHS methods; add bigger benchmarks (cherry picked from commit 25a8cc483c5bf6907b25fcb1ad30092f225eda9e) --- benchmarks/benchmarks/optimize_linprog.py | 154 ++-------------------- 1 file changed, 14 insertions(+), 140 deletions(-) diff --git a/benchmarks/benchmarks/optimize_linprog.py b/benchmarks/benchmarks/optimize_linprog.py index f51ebd84477d..00ba7ab9a6cc 100644 --- a/benchmarks/benchmarks/optimize_linprog.py +++ b/benchmarks/benchmarks/optimize_linprog.py @@ -8,56 +8,29 @@ with safe_import(): from scipy.optimize import linprog, OptimizeWarning -with safe_import() as exc: +with safe_import(): from scipy.optimize.tests.test_linprog import lpgen_2d, magic_square - from scipy.optimize._remove_redundancy import ( - _remove_redundancy_svd, - _remove_redundancy_pivot_sparse, - _remove_redundancy_pivot_dense, - _remove_redundancy_id - ) - from scipy.optimize._linprog_util import ( - _presolve, - _clean_inputs, - _LPProblem - ) -if exc.error: - _remove_redundancy_svd = None - _remove_redundancy_pivot_sparse = None - _remove_redundancy_pivot_dense = None - _remove_redundancy_id = None with safe_import(): from scipy.linalg import toeplitz -with safe_import(): - from scipy.sparse import csc_matrix, csr_matrix, issparse - -methods = [("interior-point", {"sparse": True}), - ("interior-point", {"sparse": False}), - ("revised simplex", {}), - ("highs-ipm", {})] -rr_methods = [_remove_redundancy_svd, _remove_redundancy_pivot_sparse, - _remove_redundancy_pivot_dense, _remove_redundancy_id] -presolve_methods = ['sparse', 'dense'] +methods = [("highs-ipm", {})] problems = ['25FV47', '80BAU3B', 'ADLITTLE', 'AFIRO', 'AGG', 'AGG2', 'AGG3', 'BANDM', 'BEACONFD', 'BLEND', 'BNL1', 'BNL2', 'BORE3D', 'BRANDY', - 'CAPRI', 'CYCLE', 'CZPROB', 'D6CUBE', 'DEGEN2', 'DEGEN3', 'E226', - 'ETAMACRO', 'FFFFF800', 'FINNIS', 'FIT1D', 'FIT1P', 'GANGES', - 'GFRD-PNC', 'GROW15', 'GROW22', 'GROW7', 'ISRAEL', 'KB2', 'LOTFI', - 'MAROS', 'MODSZK1', 'PEROLD', 'PILOT', 'PILOT-WE', 'PILOT4', - 'PILOTNOV', 'QAP8', 'RECIPE', 'SC105', 'SC205', 'SC50A', 'SC50B', - 'SCAGR25', 'SCAGR7', 'SCFXM1', 'SCFXM2', 'SCFXM3', 'SCORPION', - 'SCRS8', 'SCSD1', 'SCSD6', 'SCSD8', 'SCTAP1', 'SCTAP2', 'SCTAP3', - 'SHARE1B', 'SHARE2B', 'SHELL', 'SHIP04L', 'SHIP04S', 'SHIP08L', - 'SHIP08S', 'SHIP12L', 'SHIP12S', 'SIERRA', 'STAIR', 'STANDATA', - 'STANDMPS', 'STOCFOR1', 'STOCFOR2', 'TRUSS', 'TUFF', 'VTP-BASE', + 'CAPRI', 'CYCLE', 'CZPROB', 'D2Q06C', 'D6CUBE', 'DEGEN2', 'DEGEN3', + 'DFL001', 'E226', 'ETAMACRO', 'FFFFF800', 'FINNIS', 'FIT1D', + 'FIT1P', 'FIT2D', 'FIT2P', 'GANGES', 'GFRD-PNC', 'GREENBEA', + 'GREENBEB', 'GROW15', 'GROW22', 'GROW7', 'ISRAEL', 'KB2', 'LOTFI', + 'MAROS', 'MAROS-R7', 'MODSZK1', 'PEROLD', 'PILOT', 'PILOT4', + 'PILOT87', 'PILOT-JA', 'PILOTNOV', 'PILOT-WE', 'QAP8', 'QAP12', + 'QAP15', 'RECIPE', 'SC105', 'SC205', 'SC50A', 'SC50B', 'SCAGR25', + 'SCAGR7', 'SCFXM1', 'SCFXM2', 'SCFXM3', 'SCORPION', 'SCRS8', + 'SCSD1', 'SCSD6', 'SCSD8', 'SCTAP1', 'SCTAP2', 'SCTAP3', 'SHARE1B', + 'SHARE2B', 'SHELL', 'SHIP04L', 'SHIP04S', 'SHIP08L', 'SHIP08S', + 'SHIP12L', 'SHIP12S', 'SIERRA', 'STAIR', 'STANDATA', 'STANDMPS', + 'STOCFOR1', 'STOCFOR2', 'STOCFOR3', 'TRUSS', 'TUFF', 'VTP-BASE', 'WOOD1P', 'WOODW'] -presolve_problems = problems -rr_problems = ['AFIRO', 'BLEND', 'FINNIS', 'RECIPE', 'SCSD6', 'VTP-BASE', - 'BORE3D', 'CYCLE', 'DEGEN2', 'DEGEN3', 'ETAMACRO', 'PILOTNOV', - 'QAP8', 'RECIPE', 'SCORPION', 'SHELL', 'SIERRA', 'WOOD1P'] infeasible_problems = ['bgdbg1', 'bgetam', 'bgindy', 'bgprtr', 'box1', 'ceria3d', 'chemcom', 'cplex1', 'cplex2', 'ex72a', 'ex73a', 'forest6', 'galenet', 'gosh', 'gran', @@ -68,17 +41,12 @@ if not is_xslow(): enabled_problems = ['ADLITTLE', 'AFIRO', 'BLEND', 'BEACONFD', 'GROW7', 'LOTFI', 'SC105', 'SCTAP1', 'SHARE2B', 'STOCFOR1'] - enabled_presolve_problems = enabled_problems - enabled_rr_problems = ['AFIRO', 'BLEND', 'FINNIS', 'RECIPE', 'SCSD6', - 'VTP-BASE', 'DEGEN2', 'ETAMACRO', 'RECIPE'] enabled_infeasible_problems = ['bgdbg1', 'bgprtr', 'box1', 'chemcom', 'cplex2', 'ex72a', 'ex73a', 'forest6', 'galenet', 'itest2', 'itest6', 'klein1', 'refinery', 'woodinfe'] else: enabled_problems = problems - enabled_presolve_problems = enabled_problems - enabled_rr_problems = rr_problems enabled_infeasible_problems = infeasible_problems @@ -219,100 +187,6 @@ def track_netlib(self, meth, prob): return min(self.abs_error, self.rel_error) -class Netlib_RR(Benchmark): - params = [ - rr_methods, - rr_problems - ] - param_names = ['method', 'problems'] - # sparse routine returns incorrect matrix on BORE3D and PILOTNOV - # SVD fails (doesn't converge) on QAP8 - known_fails = {('_remove_redundancy_svd', 'QAP8'), - ('_remove_redundancy_pivot_sparse', 'BORE3D'), - ('_remove_redundancy_pivot_sparse', 'PILOTNOV')} - - def setup(self, meth, prob): - if prob not in enabled_rr_problems: - raise NotImplementedError("skipped") - - if (meth.__name__, prob) in self.known_fails: - raise NotImplementedError("Known issues with these benchmarks.") - - dir_path = os.path.dirname(os.path.realpath(__file__)) - datafile = os.path.join(dir_path, "linprog_benchmark_files", - prob + ".npz") - data = np.load(datafile, allow_pickle=True) - - c, A_eq, A_ub, b_ub, b_eq = (data["c"], data["A_eq"], data["A_ub"], - data["b_ub"], data["b_eq"]) - bounds = np.squeeze(data["bounds"]) - x0 = np.zeros(c.shape) - - lp = _LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0) - lp_cleaned = _clean_inputs(lp) - # rr_method is None here because we're not using RR - res = _presolve(lp_cleaned, rr=False, rr_method=None, tol=1e-9)[0] - - self.A_eq, self.b_eq = res.A_eq, res.b_eq - self.true_rank = np.linalg.matrix_rank(self.A_eq) - if meth == _remove_redundancy_pivot_sparse: - self.A_eq = csc_matrix(self.A_eq) - self.rr_A = None - - def time_netlib_rr(self, meth, prob): - self.rr_A, b, status, message = meth(self.A_eq, self.b_eq) - - def track_netlib_rr(self, meth, prob): - if self.rr_A is None: - self.time_netlib_rr(meth, prob) - - if meth == _remove_redundancy_pivot_sparse: - self.rr_A = self.rr_A.todense() - - rr_rank = np.linalg.matrix_rank(self.rr_A) - rr_rows = self.rr_A.shape[0] - - self.error1 = rr_rank - self.true_rank - self.error2 = rr_rows - self.true_rank - - if abs(self.error1) > abs(self.error2): - return float(self.error1) - else: - return float(self.error2) - - -class Netlib_presolve(Benchmark): - params = [ - presolve_methods, - presolve_problems - ] - param_names = ['method', 'problems'] - - def setup(self, meth, prob): - if prob not in enabled_presolve_problems: - raise NotImplementedError("skipped") - - dir_path = os.path.dirname(os.path.realpath(__file__)) - datafile = os.path.join(dir_path, "linprog_benchmark_files", - prob + ".npz") - data = np.load(datafile, allow_pickle=True) - - c, A_eq, A_ub, b_ub, b_eq = (data["c"], data["A_eq"], data["A_ub"], - data["b_ub"], data["b_eq"]) - bounds = np.squeeze(data["bounds"]) - x0 = np.zeros(c.shape) - - if meth == "sparse": - A_eq = csr_matrix(A_eq) - A_ub = csr_matrix(A_ub) - - lp = _LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0) - self.lp_cleaned = _clean_inputs(lp) - - def time_netlib_presolve(self, meth, prob): - _presolve(self.lp_cleaned, rr=False, rr_method=None, tol=1e-9) - - class Netlib_infeasible(Benchmark): params = [ methods, From 6eab5bbca3fae8864e77f191afafacae4de5f2da Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Sat, 24 Apr 2021 19:03:41 -0600 Subject: [PATCH 13/13] DOC: update 1.6.3 relnotes --- doc/release/1.6.3-notes.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release/1.6.3-notes.rst b/doc/release/1.6.3-notes.rst index f96a7e3df42b..8efd618e3c9f 100644 --- a/doc/release/1.6.3-notes.rst +++ b/doc/release/1.6.3-notes.rst @@ -11,13 +11,15 @@ Authors ======= * Peter Bell +* Ralf Gommers +* Matt Haberland * Peter Mahler Larsen * Tirth Patel * Tyler Reddy * Pamphile ROY + * Xingyu Liu + -A total of 6 people contributed to this release. +A total of 8 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.