diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-03-22 11:12:18 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-03-22 11:12:18 +0000 |
commit | ce1b9f834595b6c8853588d9fbb58a1988320936 (patch) | |
tree | 500bc95120b14522ed9d79acd8a241abd18dfb9d /testing/py-numpy/numpy-1.10.1-backport-2.patch | |
parent | b7491665a1eeed31172a79283db5caf12b328161 (diff) | |
download | aports-ce1b9f834595b6c8853588d9fbb58a1988320936.tar.bz2 aports-ce1b9f834595b6c8853588d9fbb58a1988320936.tar.xz |
testing/py-numpy: remove unused patches
Diffstat (limited to 'testing/py-numpy/numpy-1.10.1-backport-2.patch')
-rw-r--r-- | testing/py-numpy/numpy-1.10.1-backport-2.patch | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/testing/py-numpy/numpy-1.10.1-backport-2.patch b/testing/py-numpy/numpy-1.10.1-backport-2.patch deleted file mode 100644 index 9c33704f8e..0000000000 --- a/testing/py-numpy/numpy-1.10.1-backport-2.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 0d25dc4175e00cdaf9545e8b1b1a5b879cf67248 Mon Sep 17 00:00:00 2001 -From: Ethan Kruse <eakruse@uw.edu> -Date: Mon, 19 Oct 2015 13:29:01 -0700 -Subject: [PATCH 1/2] Potential fix for #6462 - ---- - numpy/lib/function_base.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py -index 555d083..fef69df 100644 ---- a/numpy/lib/function_base.py -+++ b/numpy/lib/function_base.py -@@ -3339,7 +3339,7 @@ def _median(a, axis=None, out=None, overwrite_input=False): - indexer[axis] = slice(index-1, index+1) - - # Check if the array contains any nan's -- if np.issubdtype(a.dtype, np.inexact): -+ if np.issubdtype(a.dtype, np.inexact) and sz > 0: - # warn and return nans like mean would - rout = mean(part[indexer], axis=axis, out=out) - part = np.rollaxis(part, axis, part.ndim) - -From 59d859fb2160950ac93267d7461ad952145c8724 Mon Sep 17 00:00:00 2001 -From: Ethan Kruse <eakruse@uw.edu> -Date: Tue, 20 Oct 2015 11:40:49 -0700 -Subject: [PATCH 2/2] Added tests for median of empty arrays - ---- - numpy/lib/tests/test_function_base.py | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - -diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py -index 4516c92..aa41c1f 100644 ---- a/numpy/lib/tests/test_function_base.py -+++ b/numpy/lib/tests/test_function_base.py -@@ -2597,6 +2597,36 @@ def test_nan_behavior(self): - assert_equal(np.median(a, (0, 2)), b) - assert_equal(len(w), 1) - -+ def test_empty(self): -+ # empty arrays -+ a = np.array([], dtype=float) -+ with warnings.catch_warnings(record=True) as w: -+ warnings.filterwarnings('always', '', RuntimeWarning) -+ assert_equal(np.median(a), np.nan) -+ assert_(w[0].category is RuntimeWarning) -+ -+ # multiple dimensions -+ a = np.array([], dtype=float, ndmin=3) -+ # no axis -+ with warnings.catch_warnings(record=True) as w: -+ warnings.filterwarnings('always', '', RuntimeWarning) -+ assert_equal(np.median(a), np.nan) -+ assert_(w[0].category is RuntimeWarning) -+ -+ # axis 0 and 1 -+ b = np.array([], dtype=float, ndmin=2) -+ with warnings.catch_warnings(record=True) as w: -+ warnings.filterwarnings('always', '', RuntimeWarning) -+ assert_equal(np.median(a, axis=0), b) -+ assert_equal(np.median(a, axis=1), b) -+ -+ # axis 2 -+ b = np.array(np.nan, dtype=float, ndmin=2) -+ with warnings.catch_warnings(record=True) as w: -+ warnings.filterwarnings('always', '', RuntimeWarning) -+ assert_equal(np.median(a, axis=2), b) -+ assert_(w[0].category is RuntimeWarning) -+ - def test_object(self): - o = np.arange(7.) - assert_(type(np.median(o.astype(object))), float) |