Skip to content

Commit

Permalink
Add test for ticket #882 fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
teoliphant committed Aug 29, 2008
1 parent adc0cc2 commit d0db38a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions numpy/core/tests/test_regression.py
Expand Up @@ -1204,5 +1204,10 @@ def test_for_object_scalar_creation(self, level=rlevel):
assert c.dtype == object
assert d.dtype == object

def test_for_zero_length_in_choose(self, level=rlevel):
"Ticket #882"
a = np.array(1)
self.failUnlessRaises(ValueError, lambda x: x.choose([]), a)

if __name__ == "__main__":
run_module_suite()

0 comments on commit d0db38a

Please sign in to comment.