diff options
author | Jay Bourque <jay.bourque@continuum.io> | 2013-07-13 16:35:29 -0500 |
---|---|---|
committer | Jay Bourque <jay.bourque@continuum.io> | 2013-08-16 16:39:32 -0500 |
commit | 2c37d3b6ec81ee6a86e4ae8f5713d48b6405cfb3 (patch) | |
tree | 481dc5fdd7a1f3f6e55c390ff67e6aafb3fd8a27 | |
parent | fcc891df4487bd45608dc2bdc7dd57f9a16c32ef (diff) | |
download | numpy-2c37d3b6ec81ee6a86e4ae8f5713d48b6405cfb3.tar.gz |
Add test for empty subspace
-rw-r--r-- | numpy/core/tests/test_ufunc.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py index 813e6f644..67b571bfb 100644 --- a/numpy/core/tests/test_ufunc.py +++ b/numpy/core/tests/test_ufunc.py @@ -983,6 +983,11 @@ class TestUfunc(TestCase): np.invert.at(a, [2, 5, 2]) assert_equal(a, [0, 1, 2, 3, 4, 5 ^ 0xffffffff, 6, 7, 8, 9]) + # Test empty subspace + orig = np.arange(4) + a = orig[:,None][:,0:0] + np.add.at(a, [0,1], 3) + assert_array_equal(orig, np.arange(4)) if __name__ == "__main__": run_module_suite() |