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

numpy-svn@scip... numpy-svn@scip...
Thu Oct 18 18:42:00 CDT 2007


Author: oliphant
Date: 2007-10-18 18:41:59 -0500 (Thu, 18 Oct 2007)
New Revision: 4243

Modified:
   trunk/numpy/lib/function_base.py
Log:
Allow subclasses through vectorize.

Modified: trunk/numpy/lib/function_base.py
===================================================================
--- trunk/numpy/lib/function_base.py	2007-10-18 23:23:34 UTC (rev 4242)
+++ trunk/numpy/lib/function_base.py	2007-10-18 23:41:59 UTC (rev 4243)
@@ -941,7 +941,7 @@
             self.ufunc = frompyfunc(self.thefunc, nargs, self.nout)
 
         # Convert to object arrays first
-        newargs = [asarray(arg,dtype=object) for arg in args]
+        newargs = [asanyarray(arg,dtype=object) for arg in args]
         if self.nout == 1:
             _res = array(self.ufunc(*newargs),copy=False).astype(self.otypes[0])
         else:



More information about the Numpy-svn mailing list