summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-11-19 13:48:52 -0500
committerGitHub <noreply@github.com>2016-11-19 13:48:52 -0500
commita91309771b0025c4e291501d0c00bf4178a66c38 (patch)
treed2e8cf7b53e0835edcdff4ee63fbbd7dc7a9665c /numpy/lib/tests/test_function_base.py
parentec02bdc782f1de83520dfd2c4eb0c48d69c909e6 (diff)
parent3f3d205cd3f607caeada0dddf41e996e288a3c50 (diff)
downloadnumpy-a91309771b0025c4e291501d0c00bf4178a66c38.tar.gz
Merge pull request #8290 from mhvk/average-preserve-subclasses
MAINT: let average preserve subclass information.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index 5bba088a8..5c2446e50 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -321,11 +321,8 @@ class TestAverage(TestCase):
a = np.array([[1,2],[3,4]]).view(subclass)
w = np.array([[1,2],[3,4]]).view(subclass)
- with suppress_warnings() as sup:
- # Note that the warning is spurious, because the test checks
- # for weights while a is ignored.
- sup.filter(FutureWarning, "np.average currently does not preserve")
- assert_equal(type(np.average(a, weights=w)), subclass)
+ assert_equal(type(np.average(a)), subclass)
+ assert_equal(type(np.average(a, weights=w)), subclass)
# also test matrices
a = np.matrix([[1,2],[3,4]])