[Numpy-svn] r3540 - trunk/numpy/lib

numpy-svn@scip... numpy-svn@scip...
Mon Feb 5 22:03:06 CST 2007


Author: oliphant
Date: 2007-02-05 22:03:04 -0600 (Mon, 05 Feb 2007)
New Revision: 3540

Modified:
   trunk/numpy/lib/type_check.py
Log:
Fix nan_to_num on complex arrays. Fixes ticket #443

Modified: trunk/numpy/lib/type_check.py
===================================================================
--- trunk/numpy/lib/type_check.py	2007-02-05 20:58:32 UTC (rev 3539)
+++ trunk/numpy/lib/type_check.py	2007-02-06 04:03:04 UTC (rev 3540)
@@ -117,7 +117,7 @@
     except AttributeError:
         t = obj2sctype(type(x))
     if issubclass(t, _nx.complexfloating):
-        y = nan_to_num(x.real) + 1j * nan_to_num(x.imag)
+        return nan_to_num(x.real) + 1j * nan_to_num(x.imag)
     else:
         try:
             y = x.copy()



More information about the Numpy-svn mailing list