[Numpy-svn] r8667 - branches/1.5.x/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Wed Aug 25 07:35:05 CDT 2010


Author: rgommers
Date: 2010-08-25 07:35:05 -0500 (Wed, 25 Aug 2010)
New Revision: 8667

Modified:
   branches/1.5.x/numpy/core/tests/test_umath_complex.py
Log:
TST: clean up invalid value warning emitted from test.

Modified: branches/1.5.x/numpy/core/tests/test_umath_complex.py
===================================================================
--- branches/1.5.x/numpy/core/tests/test_umath_complex.py	2010-08-25 12:33:53 UTC (rev 8666)
+++ branches/1.5.x/numpy/core/tests/test_umath_complex.py	2010-08-25 12:35:05 UTC (rev 8667)
@@ -10,7 +10,11 @@
 
 # At least on Windows the results of many complex functions are not conforming
 # to the C99 standard. See ticket 1574.
-functions_seem_flaky = (np.exp(complex(np.inf, 0)).imag != 0)
+err = np.seterr(invalid='ignore')
+try:
+    functions_seem_flaky = (np.exp(complex(np.inf, 0)).imag != 0)
+finally:
+    np.seterr(**err)
 # TODO: replace with a check on whether platform-provided C99 funcs are used
 have_platform_functions = (sys.platform == 'win32')
 skip_complex_tests = have_platform_functions and functions_seem_flaky



More information about the Numpy-svn mailing list