[Numpy-svn] r2950 - trunk/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Aug 3 16:19:34 EDT 2006


Author: oliphant
Date: 2006-08-03 15:19:30 -0500 (Thu, 03 Aug 2006)
New Revision: 2950

Modified:
   trunk/numpy/core/numeric.py
   trunk/numpy/core/numerictypes.py
Log:
A few corrections to scalar-type tests

Modified: trunk/numpy/core/numeric.py
===================================================================
--- trunk/numpy/core/numeric.py	2006-08-03 20:14:09 UTC (rev 2949)
+++ trunk/numpy/core/numeric.py	2006-08-03 20:19:30 UTC (rev 2950)
@@ -354,7 +354,7 @@
     if isinstance(num, generic):
         return True
     else:
-        return issctype(type(num))
+        return type(num) in ScalarType
 
 _lkup = {
     '0':'0000',

Modified: trunk/numpy/core/numerictypes.py
===================================================================
--- trunk/numpy/core/numerictypes.py	2006-08-03 20:14:09 UTC (rev 2949)
+++ trunk/numpy/core/numerictypes.py	2006-08-03 20:19:30 UTC (rev 2950)
@@ -346,7 +346,7 @@
         return False
     try:
         res = obj2sctype(rep)
-        if res:
+        if res and res != object_:
             return True
         return False
     except:




More information about the Numpy-svn mailing list