summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2006-07-26 22:12:06 +0000
committerStefan van der Walt <stefan@sun.ac.za>2006-07-26 22:12:06 +0000
commit05cdc869ae8a7f44097dd186fe6688500a99e30f (patch)
tree205656bd4d2b61bdff18ab4e24c5aac3f9e49a5f /numpy
parentec6d0629236081a4e24e632f603aa4a0b56926a3 (diff)
downloadnumpy-05cdc869ae8a7f44097dd186fe6688500a99e30f.tar.gz
Add tests for ticket #205.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_regression.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index f018eb586..16f8cd56c 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -312,5 +312,15 @@ class test_regression(NumpyTestCase):
# Correct way
N.array([(1,'object')],dt)
+ def check_zero_sized_array_indexing(self,level=rlevel):
+ """Ticket #205"""
+ tmp = N.array([])
+ def index_tmp(): tmp[N.array(10)]
+ self.failUnlessRaises(IndexError, index_tmp)
+
+ def check_unique_zero_sized(self,level=rlevel):
+ """Ticket #205"""
+ assert_array_equal([], N.unique(N.array([])))
+
if __name__ == "__main__":
NumpyTest().run()