summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_arraysetops.py
diff options
context:
space:
mode:
authorjaimefrio <jaime.frio@gmail.com>2014-02-21 16:35:32 -0800
committerjaimefrio <jaime.frio@gmail.com>2014-02-21 16:38:00 -0800
commita712c675d15385dc1cc3953a93423223d58d368d (patch)
treea2984802d73d443a7e2df36273329119141139ee /numpy/lib/tests/test_arraysetops.py
parentdd857489fcaa745ea569c523249fe37537bfe280 (diff)
downloadnumpy-a712c675d15385dc1cc3953a93423223d58d368d.tar.gz
BUG: Fixes #2799
Use `np.sort` instead of `sorted` when the input is a list and no indices are requested. Fixes #2799.
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r--numpy/lib/tests/test_arraysetops.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py
index 5934ca05a..e44ccd12b 100644
--- a/numpy/lib/tests/test_arraysetops.py
+++ b/numpy/lib/tests/test_arraysetops.py
@@ -65,6 +65,10 @@ class TestSetOps(TestCase):
bb = np.array(list(zip(b, b)), dt)
check_all(aa, bb, i1, i2, dt)
+ # test for ticket #2799
+ aa = [1.+0.j, 1- 1.j, 1]
+ assert_array_equal(np.unique(aa), [ 1.-1.j, 1.+0.j])
+
def test_intersect1d(self):
# unique inputs
a = np.array([5, 7, 1, 2])