summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-10-27 20:30:19 +0100
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-10-27 20:30:19 +0100
commit7be18edfaae4d0ba6a888160d1cc57c453b568f2 (patch)
tree85c0f49236a2158d9679fdd8ee5b0fa8db4ad5d3 /numpy/lib/tests/test_function_base.py
parent16575443239fa84615fc795692a79ef27f25c216 (diff)
parent3d5f499fd6807186baf669eec491034766caab34 (diff)
downloadnumpy-7be18edfaae4d0ba6a888160d1cc57c453b568f2.tar.gz
Merge pull request #5214 from mkowoods/np.average
Update to average calculation
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index eb0b04057..80faf85a6 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -124,6 +124,11 @@ class TestAverage(TestCase):
assert_array_equal(average(y1, weights=w2, axis=1), desired)
assert_equal(average(y1, weights=w2), 5.)
+ y3 = rand(5).astype(np.float32)
+ w3 = rand(5).astype(np.float64)
+
+ assert_(np.average(y3, weights=w3).dtype == np.result_type(y3, w3))
+
def test_returned(self):
y = np.array([[1, 2, 3], [4, 5, 6]])