From 33e2d21b6e75d11572dbadb7a8a0038cd02206eb Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Wed, 12 Oct 2005 09:50:38 +0000 Subject: Fixed remainder to behaved like Python. --- scipy/base/numeric.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'scipy/base/numeric.py') diff --git a/scipy/base/numeric.py b/scipy/base/numeric.py index d2c98c573..931a6cfff 100644 --- a/scipy/base/numeric.py +++ b/scipy/base/numeric.py @@ -68,8 +68,7 @@ def zeros_like(a): use empty_like(), which is faster as it only allocates memory.""" a = asarray(a) - return a.__array_wrap__(zeros(a.shape,a.dtype, - a.flags['FORTRAN'] and a.ndim > 1)) + return zeros(a.shape,a.dtype, a.flags['FNC']) def empty_like(a): """Return an empty (uninitialized) array of the shape and typecode of a. @@ -78,9 +77,8 @@ def empty_like(a): your array to be initialized, you should use zeros_like(). """ - asarray(a) - return a.__array_wrap__(empty(a.shape,a.dtype, - a.flags['FORTRAN'] and a.ndim > 1)) + a = asarray(a) + return empty(a.shape,a.dtype, a.flags['FNC']) # end Fernando's utilities -- cgit v1.2.1