diff options
author | rgommers <ralf.gommers@googlemail.com> | 2011-03-07 09:12:50 +0800 |
---|---|---|
committer | rgommers <ralf.gommers@googlemail.com> | 2011-03-11 12:27:02 +0800 |
commit | 44ae46c70d0b9cb4909bfafe1e4dbef3cd90f5b9 (patch) | |
tree | 9c833c7eba8b72c3306218d2a86e3c184290dee4 /numpy/lib/tests/test_arraysetops.py | |
parent | f791984cf1d8aedaeaf4fa36db539744d88de051 (diff) | |
download | numpy-44ae46c70d0b9cb4909bfafe1e4dbef3cd90f5b9.tar.gz |
DEP: remove unique1d, setmember1d and intersect1d_nu.
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r-- | numpy/lib/tests/test_arraysetops.py | 45 |
1 files changed, 3 insertions, 42 deletions
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py index dac39cd50..907a27a8c 100644 --- a/numpy/lib/tests/test_arraysetops.py +++ b/numpy/lib/tests/test_arraysetops.py @@ -17,7 +17,7 @@ class TestAso(TestCase): assert_array_equal( c, ec ) vals, indices = unique( a, return_index=True ) - + ed = np.array( [2, 3, 0, 1] ) assert_array_equal(vals, ec) @@ -25,7 +25,7 @@ class TestAso(TestCase): vals, ind0, ind1 = unique( a, return_index=True, return_inverse=True ) - + ee = np.array( [2, 3, 0, 1, 0, 2, 3] ) assert_array_equal(vals, ec) @@ -53,21 +53,6 @@ class TestAso(TestCase): assert_array_equal([], intersect1d([],[])) - def test_intersect1d_nu( self ): - # This should be removed when intersect1d_nu is removed. - a = np.array( [5, 5, 7, 1, 2] ) - b = np.array( [2, 1, 4, 3, 3, 1, 5] ) - - ec = np.array( [1, 2, 5] ) - warnings.filterwarnings('ignore', message='\s*`intersect1d_nu` is deprecated!') - warnings.filterwarnings('ignore', message='\s*`unique1d` is deprecated!') - c = intersect1d_nu( a, b ) - assert_array_equal( c, ec ) - assert_array_equal([], intersect1d_nu([],[])) - warnings.filters.pop(0) - warnings.filters.pop(0) - - def test_setxor1d( self ): a = np.array( [5, 7, 1, 2] ) b = np.array( [2, 4, 3, 1, 5] ) @@ -104,30 +89,6 @@ class TestAso(TestCase): assert_array_equal([],ediff1d(one_elem)) assert_array_equal([1],ediff1d(two_elem)) - def test_setmember1d( self ): - # This should be removed when setmember1d is removed. - a = np.array( [5, 7, 1, 2] ) - b = np.array( [2, 4, 3, 1, 5] ) - - ec = np.array( [True, False, True, True] ) - warnings.filterwarnings('ignore', '\s*`setmember1d` is deprecated!') - c = setmember1d( a, b ) - - assert_array_equal( c, ec ) - - a[0] = 8 - ec = np.array( [False, False, True, True] ) - c = setmember1d( a, b ) - assert_array_equal( c, ec ) - - a[0], a[3] = 4, 8 - ec = np.array( [True, False, True, False] ) - c = setmember1d( a, b ) - assert_array_equal( c, ec ) - - assert_array_equal([], setmember1d([],[])) - warnings.filters.pop(0) - def test_in1d(self): a = np.array( [5, 7, 1, 2] ) b = np.array( [2, 4, 3, 1, 5] ) @@ -145,7 +106,7 @@ class TestAso(TestCase): ec = np.array( [True, False, True, False] ) c = in1d( a, b, assume_unique=True ) assert_array_equal( c, ec ) - + a = np.array([5,4,5,3,4,4,3,4,3,5,2,1,5,5]) b = [2,3,4] |