From 6d3950c8ac3ad6088a473acc7d68ba405c14267c Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Sat, 8 Dec 2012 14:07:46 +0100 Subject: BUG: Fix regression for in1d with non-array input There was a regression introduced by the speed improvement in commit 6441c2a. This fixes it, and generally ravels the arrays for np.in1d. However it can be argued that at least the first array should not be ravelled in the future. Fixes "Issue gh-2755" --- numpy/lib/tests/test_arraysetops.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'numpy/lib/tests/test_arraysetops.py') diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py index b0d2ca7c3..f7e7bfdca 100644 --- a/numpy/lib/tests/test_arraysetops.py +++ b/numpy/lib/tests/test_arraysetops.py @@ -124,8 +124,9 @@ class TestSetOps(TestCase): # we use two different sizes for the b array here to test the # two different paths in in1d(). for mult in (1, 10): - a = np.array([5, 7, 1, 2]) - b = np.array([2, 4, 3, 1, 5] * mult) + # One check without np.array, to make sure lists are handled correct + a = [5, 7, 1, 2] + b = [2, 4, 3, 1, 5] * mult ec = np.array([True, False, True, True]) c = in1d(a, b, assume_unique=True) assert_array_equal(c, ec) -- cgit v1.2.1