From 4742ef06a5888264488fc250d40d7ad47b718cb2 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Thu, 29 Sep 2005 00:52:06 +0000 Subject: a.flags returns fancy array-connected dictionary. --- scipy/base/numeric.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scipy/base/numeric.py') diff --git a/scipy/base/numeric.py b/scipy/base/numeric.py index b095ec800..e0ccf41dc 100644 --- a/scipy/base/numeric.py +++ b/scipy/base/numeric.py @@ -57,6 +57,7 @@ def zeros_like(a): If you don't explicitly need the array to be zeroed, you should instead use empty_like(), which is faster as it only allocates memory.""" + a = asarray(a) return zeros(a.shape,a.dtype,a.flags['FORTRAN'] and a.ndim > 1) def empty_like(a): @@ -66,6 +67,7 @@ def empty_like(a): your array to be initialized, you should use zeros_like(). """ + asarray(a) return empty(a.shape,a.dtype,a.flags['FORTRAN'] and a.ndim > 1) # end Fernando's utilities -- cgit v1.2.1