diff options
author | Mark Wiebe <mwiebe@enthought.com> | 2011-08-02 17:06:20 -0500 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-27 07:26:50 -0600 |
commit | 00dff152bb10c810176c7e47ad41e563df602208 (patch) | |
tree | 156498d06b040209f4581edb1b91f620c5b98afe /numpy/ma | |
parent | 0375181e807f9def0e1bd0279214f5a00ec55485 (diff) | |
download | numpy-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/ma')
-rw-r--r-- | numpy/ma/tests/test_core.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index 91a3c4021..95219beb1 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -1102,13 +1102,13 @@ class TestMaskedArrayArithmetic(TestCase): output.fill(-9999) result = npfunc(xm, axis=0, out=output) # ... the result should be the given output - self.assertTrue(result is output) + assert_(result is output) assert_equal(result, xmmeth(axis=0, out=output)) # output = empty(4, dtype=int) result = xmmeth(axis=0, out=output) - self.assertTrue(result is output) - self.assertTrue(output[0] is masked) + assert_(result is output) + assert_(output[0] is masked) def test_eq_on_structured(self): |