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

numpy-svn@scip... numpy-svn@scip...
Fri Oct 19 14:06:22 CDT 2007


Author: oliphant
Date: 2007-10-19 14:06:21 -0500 (Fri, 19 Oct 2007)
New Revision: 4259

Modified:
   trunk/numpy/lib/function_base.py
Log:
Fix so that vectorize passes sub-classes through.

Modified: trunk/numpy/lib/function_base.py
===================================================================
--- trunk/numpy/lib/function_base.py	2007-10-19 10:44:43 UTC (rev 4258)
+++ trunk/numpy/lib/function_base.py	2007-10-19 19:06:21 UTC (rev 4259)
@@ -952,9 +952,10 @@
         # Convert to object arrays first
         newargs = [asanyarray(arg,dtype=object) for arg in args]
         if self.nout == 1:
-            _res = array(self.ufunc(*newargs),copy=False).astype(self.otypes[0])
+            _res = array(self.ufunc(*newargs),copy=False,
+                         subok=True).astype(self.otypes[0])
         else:
-            _res = tuple([array(x,copy=False).astype(c) \
+            _res = tuple([array(x,copy=False,subok=True).astype(c) \
                           for x, c in zip(self.ufunc(*newargs), self.otypes)])
         return _res
 



More information about the Numpy-svn mailing list