summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
authorMark Wiebe <mwiebe@enthought.com>2011-08-02 17:06:20 -0500
committerCharles Harris <charlesr.harris@gmail.com>2011-08-27 07:26:50 -0600
commit00dff152bb10c810176c7e47ad41e563df602208 (patch)
tree156498d06b040209f4581edb1b91f620c5b98afe /numpy/lib/tests
parent0375181e807f9def0e1bd0279214f5a00ec55485 (diff)
downloadnumpy-00dff152bb10c810176c7e47ad41e563df602208.tar.gz
ENH: umath: Make sum, prod, any, or functions use the .reduce method directly
This required some extensive changes, like: * Making logical_or, logical_and, and logical_not on object arrays behave like their Python equivalents instead of calling methods on the objects * Changing the units for a fair number of the binary operations to None, so they don't get initialized to their unit values at the start A consequence of this is that multi-dimensional reductions like sum, prod, any, or all no longer need to make copies, so are faster in some cases.
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_function_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index 105389d6d..0b6b1e19d 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -452,7 +452,7 @@ class TestTrapz(TestCase):
def test_simple(self):
r = trapz(exp(-1.0 / 2 * (arange(-10, 10, .1)) ** 2) / sqrt(2 * pi), dx=0.1)
#check integral of normal equals 1
- assert_almost_equal(sum(r, axis=0), 1, 7)
+ assert_almost_equal(r, 1, 7)
def test_ndim(self):
x = linspace(0, 1, 3)