summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_arraysetops.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2012-12-08 14:07:46 +0100
committerSebastian Berg <sebastian@sipsolutions.net>2012-12-08 14:09:42 +0100
commit6d3950c8ac3ad6088a473acc7d68ba405c14267c (patch)
tree623f7940d7806a78fff484811dc8f80052a8c168 /numpy/lib/tests/test_arraysetops.py
parent7b75899f586ee476affbf89572d0105996725d94 (diff)
downloadnumpy-6d3950c8ac3ad6088a473acc7d68ba405c14267c.tar.gz
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"
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r--numpy/lib/tests/test_arraysetops.py5
1 files changed, 3 insertions, 2 deletions
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)