8000 Change the default error state to 'warn' by rkern · Pull Request #65 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Change the default error state to 'warn' #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUG: Add test for the default error state.
  • Loading branch information
rkern committed Apr 1, 2011
commit b2926d890f6f9afd5152f34b814efcd6d8f5cf7f
9 changes: 9 additions & 0 deletions numpy/core/tests/test_errstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
from numpy.testing import *

class TestErrstate(TestCase):
def test_default(self):
err = geterr()
self.assertEqual(err, dict(
divide='warn',
invalid='warn',
over='warn',
under='ignore',
))

def test_invalid(self):
with errstate(all='raise', under='ignore'):
a = -arange(3)
Expand Down
0