diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-07-10 11:10:13 -0500 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-07-11 09:15:31 -0600 |
commit | 0ce8c51ef2f25c54c34c7c47c5ccbf0ce81cecac (patch) | |
tree | 97ace42a6d5dd2aecaeb515f50bdc720119c3c2d | |
parent | d3172da58be7f3dc886c0a4c627b0b9b56efcf4d (diff) | |
download | numpy-0ce8c51ef2f25c54c34c7c47c5ccbf0ce81cecac.tar.gz |
ENH: umath: Use masked iteration to allow buffered 'where=' output operands
-rw-r--r-- | numpy/core/src/umath/ufunc_object.c | 5 | ||||
-rw-r--r-- | numpy/core/tests/test_ufunc.py | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c index a89c0f235..2ffca63d2 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -1480,9 +1480,10 @@ execute_ufunc_masked_loop(PyUFuncObject *self, NPY_ITER_ALIGNED| NPY_ITER_ALLOCATE| NPY_ITER_NO_BROADCAST| - NPY_ITER_NO_SUBTYPE; + NPY_ITER_NO_SUBTYPE| + NPY_ITER_WRITEMASKED; } - op_flags[nop] = NPY_ITER_READONLY; + op_flags[nop] = NPY_ITER_READONLY|NPY_ITER_ARRAYMASK; NPY_UF_DBG_PRINT("Making iterator\n"); diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py index a7af19486..974a6d6f8 100644 --- a/numpy/core/tests/test_ufunc.py +++ b/numpy/core/tests/test_ufunc.py @@ -499,7 +499,6 @@ class TestUfunc(TestCase): np.subtract(a, 2, out=a, where=[True,False]) assert_equal(a, [[0, 27], [14, 5]]) - @dec.knownfailureif(True) def test_where_param_buffer_output(self): # This test is temporarily skipped because it requires # adding masking features to the nditer to work properly |