diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-10-19 19:06:21 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-10-19 19:06:21 +0000 |
commit | e052f245f10a3f13e33f1e6fc2d15f22c03b377f (patch) | |
tree | 51d8a18339da32880545b069fb9fb91e0ebc61eb /numpy/lib/function_base.py | |
parent | 21b4beeb2aa5692333c4f822ee0471ff3eb63f27 (diff) | |
download | numpy-e052f245f10a3f13e33f1e6fc2d15f22c03b377f.tar.gz |
Fix so that vectorize passes sub-classes through.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 0ca570190..d083ad5e6 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -952,9 +952,10 @@ class vectorize(object): # 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 |