diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-07-08 18:56:56 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-07-09 11:58:50 +0200 |
commit | 9bfc4a81870b83dc8bb066d73d0cdd48e74e1aa3 (patch) | |
tree | 5d8879a4083115d2789878ee72c2fa437907cf53 /gnu/packages/patches | |
parent | 3125255cc5a51a0ac435408c73ed6253070ea215 (diff) | |
download | guix-9bfc4a81870b83dc8bb066d73d0cdd48e74e1aa3.tar guix-9bfc4a81870b83dc8bb066d73d0cdd48e74e1aa3.tar.gz |
gnu: python-seaborn: Update to 0.11.1.
* gnu/packages/patches/python-seaborn-kde-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python-xyz.scm (python-seaborn): Use it, and update to
0.11.1.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/python-seaborn-kde-test.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-seaborn-kde-test.patch b/gnu/packages/patches/python-seaborn-kde-test.patch new file mode 100644 index 0000000000..f300dffc6f --- /dev/null +++ b/gnu/packages/patches/python-seaborn-kde-test.patch @@ -0,0 +1,36 @@ +This patch is an excerpt of this upstream commit: + + commit 0a24478a550132f1882e5be5f5dbc0fc446a8a6c + Author: Michael Waskom <mwaskom@users.noreply.github.com> + Date: Mon Dec 21 18:44:58 2020 -0500 + + Raise minimal supported Python to 3.7 and bump requirements (#2396) + +It fixes the failure of 'test_weights'. + +--- a/seaborn/tests/test_distributions.py ++++ b/seaborn/tests/test_distributions.py +@@ -709,21 +708,17 @@ class TestKDEPlotUnivariate: + integral = integrate.trapz(ydata, np.log10(xdata)) + assert integral == pytest.approx(1) + +- @pytest.mark.skipif( +- LooseVersion(scipy.__version__) < "1.2.0", +- reason="Weights require scipy >= 1.2.0" +- ) + def test_weights(self): + + x = [1, 2] + weights = [2, 1] + +- ax = kdeplot(x=x, weights=weights) ++ ax = kdeplot(x=x, weights=weights, bw_method=.1) + + xdata, ydata = ax.lines[0].get_xydata().T + +- y1 = ydata[np.argwhere(np.abs(xdata - 1).min())] +- y2 = ydata[np.argwhere(np.abs(xdata - 2).min())] ++ y1 = ydata[np.abs(xdata - 1).argmin()] ++ y2 = ydata[np.abs(xdata - 2).argmin()] + + assert y1 == pytest.approx(2 * y2) |