summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index a8d9296a6..c7cc06a45 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -57,6 +57,13 @@ class test_average(NumpyTestCase):
assert_array_equal(y5.mean(0), average(y5, 0))
assert_array_equal(y5.mean(1), average(y5, 1))
+ def check_weighted(self):
+ y1 = array([[1,2,3],
+ [4,5,6]])
+ actual = average(y1,weights=[1,2],axis=0)
+ desired = array([3.,4.,5.])
+ assert_array_equal(actual, desired)
+
class test_logspace(NumpyTestCase):
def check_basic(self):
y = logspace(0,6)